Free course · coding interviews
DSA: the NeetCode 150, one pattern at a time
18 patterns and 150 problems, in order. Each topic teaches the pattern first (the idea, a picture, a Python template and two traced examples), then gives its problems as questions with hidden answers. Problems you solve come back for review, so they are still there in a month.
Review today
Nothing to review yet. Tick a problem as solved in any topic, and it comes back here tomorrow to solve again.
Start with Arrays & Hashing Which pattern? Practise spotting them
Fundamentals
-
Topic 1
Arrays & Hashing
Seen it before? Ask the hash map — one step, not a second loop.
9 problems -
Topic 2
Two Pointers
Sorted? Start at both ends and walk inwards — each move throws away an impossible answer.
5 problems -
Topic 3
Sliding Window
Grow the right edge; while the window breaks the rule, shrink the left edge.
6 problems -
Topic 4
Stack
The most recent unfinished thing comes first: push it, and pop when its match arrives.
6 problems -
Topic 5
Binary Search
Sorted, or 'yes, yes, yes, no, no'? Check the middle and throw half away.
7 problems -
Topic 6
Linked List
Draw the boxes. Save next before you change a pointer, and add a dummy head to remove edge cases.
11 problems
Advanced Data Structures & Algorithms
-
Topic 7
Trees
Trust the recursion: solve it for the left and right children, then combine at the node.
15 problems -
Topic 8
Heap / Priority Queue
'K largest' → keep a min-heap of size k; the smallest in it is the k-th largest.
7 problems -
Topic 9
Backtracking
Choose, explore, un-choose — and stop early when a path can't work.
10 problems -
Topic 10
Tries
Prefixes? Store words letter by letter in a tree, so shared beginnings are stored once.
3 problems -
Topic 11
Graphs
Graph = nodes + edges + a visited set. DFS to explore everything; BFS for the fewest steps.
13 problems -
Topic 12
Advanced Graphs
Weighted edges? Dijkstra: always expand the cheapest known node next (a heap).
6 problems
Algorithmic Mastery
-
Topic 13
1-D Dynamic Programming
Write what dp[i] means in one sentence, then build it from dp[i − 1] and dp[i − 2].
12 problems -
Topic 14
2-D Dynamic Programming
Two inputs or a grid? dp[i][j] = the answer for the first i of one and the first j of the other.
11 problems -
Topic 15
Greedy
Take the best-looking move now — but only if you can explain why it can never hurt later.
8 problems -
Topic 16
Intervals
Sort by start, then compare each interval with the last one you kept.
6 problems -
Topic 17
Math & Geometry
Do it on paper with a tiny example first; the code is usually a few careful index moves.
8 problems -
Topic 18
Bit Manipulation
XOR cancels pairs (a ^ a = 0), and x & (x − 1) deletes the lowest 1 bit.
7 problems
Your progress
Your ticks are saved in this browser only, with no account. To keep them safe, or to carry on on another device, download a progress file and load it there. The file is made on your device and never sent to us.