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.

18patterns
150problems
0you've solved
0to review today

Review today

Nothing to review yet. Tick a problem as solved in any topic, and it comes back here tomorrow to solve again.

Fundamentals

  1. Topic 1

    Arrays & Hashing

    Seen it before? Ask the hash map — one step, not a second loop.

    9 problems
  2. Topic 2

    Two Pointers

    Sorted? Start at both ends and walk inwards — each move throws away an impossible answer.

    5 problems
  3. Topic 3

    Sliding Window

    Grow the right edge; while the window breaks the rule, shrink the left edge.

    6 problems
  4. Topic 4

    Stack

    The most recent unfinished thing comes first: push it, and pop when its match arrives.

    6 problems
  5. Topic 5

    Binary Search

    Sorted, or 'yes, yes, yes, no, no'? Check the middle and throw half away.

    7 problems
  6. 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

  1. Topic 7

    Trees

    Trust the recursion: solve it for the left and right children, then combine at the node.

    15 problems
  2. 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
  3. Topic 9

    Backtracking

    Choose, explore, un-choose — and stop early when a path can't work.

    10 problems
  4. Topic 10

    Tries

    Prefixes? Store words letter by letter in a tree, so shared beginnings are stored once.

    3 problems
  5. Topic 11

    Graphs

    Graph = nodes + edges + a visited set. DFS to explore everything; BFS for the fewest steps.

    13 problems
  6. Topic 12

    Advanced Graphs

    Weighted edges? Dijkstra: always expand the cheapest known node next (a heap).

    6 problems

Algorithmic Mastery

  1. 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
  2. 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
  3. Topic 15

    Greedy

    Take the best-looking move now — but only if you can explain why it can never hurt later.

    8 problems
  4. Topic 16

    Intervals

    Sort by start, then compare each interval with the last one you kept.

    6 problems
  5. Topic 17

    Math & Geometry

    Do it on paper with a tiny example first; the code is usually a few careful index moves.

    8 problems
  6. 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.

Frequently asked questions

What is the NeetCode 150?
A well-known list of 150 LeetCode problems, chosen by NeetCode (neetcode.io), that covers the patterns asked in coding interviews. The list and its order are NeetCode's; every lesson, template, traced example and answer here is Hamropedia's own. The problems themselves link to LeetCode.
Is it free?
Yes: all 18 lessons, the templates, the traced examples, the 150 question-and-answer cards, the review schedule and the drill, with no sign-up. Most of the problems can be solved on LeetCode with a free account, but a few (such as Meeting Rooms, Alien Dictionary and Graph Valid Tree) are LeetCode Premium. For those, the pattern, the template and the answer card here still teach you the idea.
How do the reviews work?
Tick a problem once you have solved it on your own. It comes back here the next day, to solve again from a blank editor. Each time you solve it, the gap grows: 1, 3, 7, 14, then 30 days, then every month. "Struggled" keeps the same gap; "Couldn't" starts again tomorrow. At most three a day, longest overdue first, so it never becomes a pile.
Which language are the templates in?
Python, with a Java version of each topic's template underneath. The patterns are the same in any language.
Where is my progress saved?
In your browser only. Use Download my progress on this page to back it up or move it to another device: it carries your solved problems, review dates and drill progress.