Coding Problems
Overview
This section covers 180+ LeetCode problems organized by pattern category. The core set is the NeetCode 150, the de facto modern interview prep list and a superset of Blind 75. Beyond that, each category includes bonus problems drawn from the data-structure and algorithm pages on this site — problems that reinforce the same patterns but fall outside the curated 150.
NeetCode 150 problems are tagged neetcode-150 in their frontmatter. Bonus problems appear in the same category directories without that tag.
Every problem page includes:
- Brute force: the most direct approach, always correct, often or worse.
- Improved / optimal: the interview-level answer, best achievable time and space.
Each approach has working Python, line-labeled code, and a per-line complexity table. Many pages also include a How to recognize this pattern section covering the signal in the problem statement, a counterexample that breaks the tempting-but-wrong approach, and a table of related problems with the same shape.
For the reusable tactics behind those solutions, use Coding Concepts. Those pages explain ideas like two pointers, sliding windows, greedy exchange arguments, memoization, graph traversal, heaps, and monotonic structures, then link back to representative problems.
Categories
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 (36 problems)
- Medium problems (118 problems)
- Hard problems (26 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 the optimal approach. Understand why the gap closes: usually a hash map, a monotonic structure, or a clever invariant.
- Check the “How to recognize this pattern” section if the page has one. It contains the signal to look for and the counterexample that breaks the wrong approach.
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
- NeetCode YouTube channel, video walkthroughs for every problem
- Grind 75, alternative curated list, includes many overlapping problems
- Blind 75, the subset that started it all
- LeetCode patterns, problem list organized by common patterns
Related topics
- Data structures, the longer-form reference for the structures used in every solution.
- Named algorithms, the canonical algorithms that show up inside these problems: Dijkstra, Tarjan, KMP, Floyd’s, and more.
- Coding concepts, the approach vocabulary behind the problem solutions.