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.
Foundations
- 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.
0 of 3 solved - Two pointers
Walk sorted data from two positions at once, moving whichever pointer can only improve the answer.
0 of 2 solved - Stacks
Keep unfinished items in last-in, first-out order, so the most recent one is always the next to resolve.
0 of 2 solved
Core
- Sliding window
Answer questions about contiguous runs of a list in one pass, by moving two ends forward instead of rechecking every run.
0 of 3 solved - Binary search
Find a boundary in sorted data, or the smallest setting that works, by halving the range of candidates each step.
0 of 3 solved - Heaps
Keep the smallest (or largest) item one step away while items keep arriving, without sorting everything again.
0 of 2 solved
Advanced
- 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.
0 of 2 solved - Dynamic programming
Solve each smaller version of the problem once, store the answer, and build the full answer from those.
0 of 2 solved
Write solutions in JavaScript or TypeScript.