Learn

Learn to code

Pick a language, gear up your hero, and battle through short lessons you can run right on the page.

Interactive lessons
Problem-solving techniques
Optional

Classic problem-solving patterns, ordered from easiest to hardest. Examples adapt to your language — every language track has a full translation. Finish a language track first, then work through these at your own pace. Work top to bottom, each lesson gets a little harder. Skip until you're comfortable with variables, loops, and functions.

Boss

The Algorithm Archon

0/13 lessons
Steps to boss13 / 13

“Patterns are power. Prove you see them.”

Lesson path

  1. Current lesson
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. Boss
  1. 1

    Prefix Sums

    Precompute running totals so any range sum becomes a quick subtraction.

    6 min · Python examples

  2. 2

    Frequency Counting

    Use a dictionary to count how many times each value appears.

    6 min · Python examples

  3. 3

    Two Pointers

    Walk two indices through a sorted array to find pairs or ranges in one pass.

    7 min · Python examples

  4. 4

    Sliding Window

    Track a moving subarray window to answer range questions without restarting from scratch.

    7 min · Python examples

  5. 5

    Greedy Algorithms

    Make the locally best choice at each step when that strategy is safe.

    7 min · Python examples

  6. 6

    Binary Search

    Cut a sorted list in half each step to find a value in logarithmic time.

    8 min · Python examples

  7. 7

    Stacks

    Last-in-first-out structure for matching brackets, undo logic, and monotonic scans.

    7 min · Python examples

  8. 8

    Linked Lists

    Chain nodes with next pointers — traverse, count, and update without shifting a whole array.

    8 min · Python examples

  9. 9

    Breadth-First Search (BFS)

    Explore a graph level by level — shortest steps in an unweighted grid or maze.

    9 min · Python examples

  10. 10

    Depth-First Search (DFS)

    Dive deep along one path before backtracking — great for exploring all reachable nodes.

    9 min · Python examples

  11. 11

    Graphs

    Represent nodes and edges with an adjacency list, then traverse to explore connections.

    9 min · Python examples

  12. 12

    Backtracking

    Try choices, undo when they fail, and search all valid combinations.

    10 min · Python examples

  13. 13

    Dynamic Programming

    Break a problem into overlapping subproblems, remember answers, and reuse them.

    10 min · Python examples

Guides
View all
Already comfortable writing code? Jump straight to practice problems.