DSA practice

Learn one pattern at a time, then solve its problems in the browser. Your code is checked against examples, hidden tests and large inputs; nothing is sent anywhere. Each problem comes back for a re-solve after a growing gap.

System design practice

Foundations

  1. Hash maps

    Remember what you have seen, keyed by what you will ask for later, so each lookup is one step instead of a search.

    3 problems1 hDraft
    0 of 3 solved
  2. Two pointers

    Walk sorted data from two positions at once, moving whichever pointer can only improve the answer.

    2 problems40 minDraft
    0 of 2 solved
  3. Stacks

    Keep unfinished items in last-in, first-out order, so the most recent one is always the next to resolve.

    2 problems40 minDraft
    0 of 2 solved

Core

  1. Sliding window

    Answer questions about contiguous runs of a list in one pass, by moving two ends forward instead of rechecking every run.

    3 problems1 h 25 minBuilds on Hash maps and Two pointersDraft
    0 of 3 solved
  2. Binary search

    Find a boundary in sorted data, or the smallest setting that works, by halving the range of candidates each step.

    3 problems1 h 35 minBuilds on Two pointersDraft
    0 of 3 solved
  3. Heaps

    Keep the smallest (or largest) item one step away while items keep arriving, without sorting everything again.

    2 problems1 h 10 minDraft
    0 of 2 solved

Advanced

  1. Graphs: breadth-first search

    Explore a network level by level, so the first time you reach something is by the fewest steps, and order work so nothing runs before what it depends on.

    2 problems55 minBuilds on Hash maps and HeapsDraft
    0 of 2 solved
  2. Dynamic programming

    Solve each smaller version of the problem once, store the answer, and build the full answer from those.

    2 problems1 h 10 minBuilds on Hash mapsDraft
    0 of 2 solved

Write solutions in JavaScript or TypeScript.

Esc
↑ ↓ to move↵ to open