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
- Best Time to Buy and Sell StockGiven a series of daily prices, buy on one day and sell on a later one to make the largest possible profit, or make none at all.Easy
- Longest Substring Without Repeating CharactersFind the length of the longest run of consecutive characters in a string that contains no character twice.Medium
➕ 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.