Practice

Solve problems in your browser

Every problem starts as a small story, gives you hints one at a time, and runs your JavaScript or Python against real tests. Nothing to install.

0/ 138 solved
Easy
0/59
Medium
0/59
Hard
0/20

Arrays & Hashing

16 problems

Counting, lookups and remembering what you have seen. Learn it first: Arrays, Strings, Hash Tables, Prefix Sums.

Two Pointers & Sliding Window

13 problems

Walk an array from both ends, or keep a moving window. Learn it first: Two Pointers, Sliding Window.

Linked Lists, Stacks & Queues

13 problems

Pointer surgery and last-in, first-out thinking. Learn it first: Linked Lists, Stacks, Queues and Deques, Monotonic Stack.

Binary Search & Sorting

12 problems

Halve the search space, or sort first and make the problem easy. Learn it first: Simple Sorts, Merge Sort, Quicksort, Heap Sort.

Trees

13 problems

Recursion on trees, traversals and search trees. Learn it first: Binary Trees, Tree Traversals, Binary Search Trees, Balanced Trees.

Graphs

12 problems

Grids, networks, dependencies and shortest paths. Learn it first: Graph Basics, Breadth-First Search, Depth-First Search, Topological Sort.

Backtracking & Recursion

11 problems

Try a choice, explore, undo, try the next. Learn it first: Recursion, Backtracking, Divide and Conquer.

Greedy & Intervals

11 problems

Make the locally best move, and know when that is safe. Learn it first: Greedy Algorithms, Intervals.

Dynamic Programming

14 problems

Define the subproblem, then fill the table. Learn it first: Introduction to Dynamic Programming, 1D Dynamic Programming, DP on Grids, Knapsack.

Heaps, Tries & Bits

12 problems

Specialised structures and low-level tricks. Learn it first: Heaps and Priority Queues, Tries, Bit Manipulation, String Matching.

ML From Scratch

11 problems

Build the core pieces of machine learning with plain code. Learn it first: How Models Learn, Regression and Classification, Overfitting and Evaluation, Decision Trees and Ensembles.