Pattern-first interview prep
See the pattern. Solve with confidence.
All 37 interview patterns: recognition cues, multi-language templates, interactive mental models, and a full path of LeetCode write-ups with tests. Cite the source, learn the trade-off.
- Patterns
- 37
- Write-ups
- 147
- Languages
- 3
- Source
- LC
How learning works here
- 01
Recognize the pattern
Cues, when-to-use, and pitfalls so you can name the approach in under 90 seconds.
- 02
Apply the template
Copy-paste-ready skeletons in TypeScript, Python, and C# for every published pattern.
- 03
Compare trade-offs
Multiple solutions where it matters: complexity, when each fails, and what changed from the template.
Foundations (start here)
All patterns →Sliding Window
Longest, shortest, or valid contiguous ranges over arrays and strings.
Complete 6/6 · template
Two Pointers
Sorted arrays, pair conditions, or coordinated movement from both ends.
Complete 6/6 · template
Fast & Slow Pointers
Linked-list cycles, middle nodes, and fixed pointer gaps.
Complete 6/6 · template
Binary Search
Halve a sorted or monotonic search space until you pin the answer.
Complete 6/6 · template
Binary Search on Answer
Binary search the answer value itself; check if a candidate is feasible in linear time.
Complete 6/6 · template
Hashing
O(1) average lookup, frequency counting, grouping, and complement checks.
Complete 6/6 · template