AlgoScope

Predict the next step before it runs.

Every topic, drawn one decision at a time. You guess first.

Binary SearchSample run
Python
def binary_search(values, target): low = 0 high = len(values) - 1 while low <= high: mid = low + (high - low) // 2 if values[mid] == target: return mid if values[mid] < target: low = mid + 1 else: high = mid - 1 return -1

A binary search for 56 plays on a loop: the trace fills in one step at a time, a prompt asks what happens next, the answer is Found it, and the run ends with 56 found in 2 comparisons.

Every lesson is a player you can drive.

  • Compare two algorithms

    Two algorithms, each playing its own run, side by side.

    In the clip, linear search checks the cells one at a time and finds 2 after 4 comparisons, while binary search finds 56 after 2. Each plays its own example.

  • Your own input

    Any lesson, on input you type.

    In the clip, the numbers 3, 1, 3, 2, 1 are typed, Enter and Run are pressed, and the run starts on them.

  • Code that moves with the picture

    Variables and picture move with it.

    In the clip, a highlight steps down the binary search code in Python, line 3, then line 5, then line 6, while the matching cell and the names low and mid are marked on the cells 4, 9, 15, 21, 27, 33 in the row below.

  • Keys for everything

    Step, play and answer from the keyboard.

    The arrow keys step, Space plays and pauses, and the number keys answer a question.

  • Write it yourself

    JavaScript or Python, against the lesson's examples.

    In the clip, a binarySearch function appears line by line in the editor, which offers JavaScript and Python, Run is pressed, and the test cases appear, ending with All 8 cases pass.

  • Predict mode

    It stops before each decision. Pick an answer, then watch what really happens.

    Try it on binary search

    In the clip, a question stops the run at 16 against 56; the right pill is picked and the next row shows 56 found.

One loop, on every topic.

Watch it, predict it, understand it.

Insertion sort on 8 numbers

21 comparisons and 17 swaps.

Two tracks, in taught order.

Foundations

The essentials, in an order you can follow from zero.

From Array to Sliding Window.

stops
89
lessons
45
categories
23
Start Foundations

Interview Core

The mainstream set a university course or an interview loop expects, easiest first.

From Array to AVL Tree.

stops
180
lessons
77
categories
28
Start Interview Core

The same engine on web, iOS and Android.

Web player
Next.js and React
Engine in the browser
Kotlin, as WebAssembly
iOS app
SwiftUI
Android app
Jetpack Compose
Offline
In both apps

Good to know

Do I need an account?

No. An account saves your progress and predictions across devices.

Create an account
Can I run a lesson on my own input?

Yes, on every lesson, in Chrome 119, Firefox 120, Safari 18.2 or newer.

Is there an app?

Yes, on the App Store and Google Play, offline too.