Free. No sign-up. Runs in your browser.

Learn algorithms and AI by working through them.

Lessons you can step through one move at a time, problems you solve and test right here, and a plain-spoken guide to how AI works and how to use it well.

Two pointers, step by stepUse the arrows or ← → keys
  1. prices
    01L
    13
    24
    36
    49
    511R
    sum
    12
    budget
    14

    1Sorted prices, budget 14. Put one finger on each end.

  2. prices
    01
    13L
    24
    36
    49
    511R
    sum
    14
    budget
    14

    212 is too small. Only moving L can make the sum bigger.

  3. prices
    01
    13L
    24
    36
    49
    511R
    sum
    14
    budget
    14

    33 + 11 = 14. Found it in two steps, not fifteen.

1 / 3
Algorithms From Big-O to dynamic programming, one concrete example at a time.
  • Step-through traces of every idea
  • Code in JavaScript and Python
  • Quick checks as you go
50 of 50 lessons · 10 modules
Practice Problems like the ones in interviews, told as small stories, with hints that teach.
  • Hints revealed one at a time
  • Run and submit in the browser
  • Walkthroughs after you solve
138 problems · 11 topics
AI How machine learning and LLMs work, then the craft of prompting, context and agents.
  • No hype, no vendor lock-in
  • Rewrite real prompts yourself
  • Habits for checking AI output
42 of 42 lessons · 6 modules

New here? Start with these five.

About an hour in total. You will learn how to measure code, use the most useful data structure there is, solve a real problem in the browser, and write better prompts.

  1. 1LessonWhat Is an AlgorithmWhat you are actually learning, in ten minutes.
  2. 2LessonBig-O NotationThe one tool you need to compare solutions.
  3. 3LessonHash TablesThe data structure behind half of all interview answers.
  4. 4ProblemMatching ReceiptsYour first problem. Write code, run it, see it pass.
  5. 5AI lessonPrompting BasicsStart using AI tools well, whatever you build.

How it works

See it move

Every algorithm comes with a tracer. Click Next and watch the pointers, the table, the queue change one step at a time.

Write real code

Solve problems in JavaScript or Python. Your code runs in your browser against visible examples and hidden edge cases.

Get unstuck the right way

Hints come one at a time, from a nudge to nearly the answer. The full walkthrough unlocks when you solve it, or when you decide to look.

Looking for the original 2017 posts on merge sort, MSTs and Markov chains? They live in the archive.