Solutions you can watch run

Most solution write-ups hand you finished code and leave you to reverse-engineer why it works. These animate the algorithm step by step, with the reason for each move written underneath it — because the moment an algorithm clicks is the moment you see why a step is safe to take, not the moment you read the loop that takes it.

Every animation here is a recording of the code on that page actually executing. Nothing is hand-drawn, so nothing can quietly disagree with the solution it illustrates.

🗂️ Arrays & Hashing

👉 Two Pointers

🪟 Sliding Window

Prefix Sum

🎯 Binary Search

🥞 Stack & Monotonic Stack

📏 Intervals

🌳 Trees & BST

🍀 Greedy

🕸️ Graphs (BFS/DFS)

🔢 Bit Manipulation

📈 1-D Dynamic Programming

🗺️ 2-D Dynamic Programming

📐 Math & Geometry

More arriving steadily — the 20 patterns on the Pattern Map are being worked through in order.