LeetCode 150 (NeetCode)
Overview
The NeetCode 150 is the de facto curated problem set for modern tech interview prep, a superset of Blind 75 organized by pattern. This topic walks through each problem with three tiers of solution:
- Brute force, the most direct, often O(n²) or worse; always runs and always correct.
- Improved, a standard optimization: sorting, a single hash map, two pointers.
- Optimized, the interview-level answer: best time and space complexity the problem admits.
Each problem page includes the prompt, all three approaches with working Python, and a complexity summary table.
Categories
- Arrays & Hashing (9 problems)
- Two Pointers (5 problems)
- Sliding Window (6 problems)
- Stack (7 problems)
- Binary Search (7 problems)
- Linked List (11 problems)
- Trees (15 problems)
- Heap / Priority Queue (7 problems)
- Backtracking (9 problems)
- Tries (3 problems)
- Graphs (13 problems)
- Advanced Graphs (5 problems)
- 1-D Dynamic Programming (12 problems)
- 2-D Dynamic Programming (11 problems)
- Greedy (8 problems)
- Intervals (6 problems)
- Math & Geometry (8 problems)
- Bit Manipulation (7 problems)
- Matrix (4 problems)
Browse by difficulty
Pattern-grouping is the default; difficulty is the orthogonal axis when you want to ramp up gradually or save the hard set for last.
- Easy problems (28 problems)
- Medium problems (99 problems)
- Hard problems (22 problems)
- By-difficulty hub, all three together
How to use
Work through a category end-to-end. Within each problem:
- Read the prompt. Try to solve without scrolling.
- If stuck, read only Approach 1 (brute force). Reimplement yourself.
- Compare your solution with Approach 3. Understand why the gap closes, usually a hash map, a monotonic structure, or a clever invariant.
Complexity sections use standard Big-O notation. n is the input size unless otherwise noted.
References
- NeetCode 150, official list
- NeetCode roadmap, organized by pattern
- Grind 75, alternative curated list, includes many overlapping problems
- Blind 75, the subset that started it all
Related posts
- Data structure complexity cheat sheet, operation-level big-O across every structure these problems use.
- Common algorithms cheat sheet, Dijkstra, Kahn, Kruskal, Tarjan, KMP, quickselect, with canonical implementations.
Related topics
- Data structures, the longer-form reference for the structures referenced in every solution.