Blueprints
Solve it three times: brute force, faster, optimal
Each blueprint takes one core interview pattern through three stages. Smelt: get a correct answer. Hammer: make it fast enough for real data. Polish: cut the memory and tidy the code. Every stage has a step-through visualizer, and a benchmark runs all three in your browser so you can see the difference. No account needed.
Two Pointers
Two Pointers: Find a Pair With a Target Sum in a Sorted Array
O(n²) → O(n) → O(n)
Hash Map
Hash Map: Two Sum on an Unsorted Array, From O(n²) to One Pass
O(n²) → O(n log n) → O(n)
Sliding Window
Sliding Window: Maximum Sum of k Consecutive Elements
O(n·k) → O(n) → O(n)
Binary Search
Binary Search: Find the First Occurrence in a Sorted Array
O(n) → O(log n + d) → O(log n)
Breadth-First Search
BFS: Shortest Path in a Grid, From Brute-Force DFS to Early-Exit BFS
Exponential → O(cells) → O(cells)