Algorithms

The moves you'll make.

Search, traverse, partition, relax. Each algorithm runs in your browser with the same controls - play, step, scrub, replay - so the trick stops being a trick and starts being a pattern you recognize.

Start here

Recommended path

New to this section? Work through these in order - each builds on the previous.

  1. 1Binary Search
  2. 2Two Pointers
  3. 3Sliding Window (fixed size)
  4. 4Merge Sort
  5. 5Breadth-First Search
  6. 6Depth-First Search
  7. 7Dijkstra's Shortest Paths
  8. 8Topological Sort
  9. 9N-Queens

Search

1

Traversal

2

Graph algorithms

2

Optimization

2

Backtracking

1

Sorting

2