Practice
DSA Problems
Start with Big-O, then solve 50 interview problems across 8 topics, in an order where each topic builds on the last. Every problem gets a write-up: the intuition, a diagram, brute force to optimal, and code.
Topics
Eight topics, in learning order. Each one builds on the one before.
01 · 10 problems
Arrays, Strings and Hashing
The basics everything else builds on: scanning arrays and strings, two pointers, sliding windows, and hash maps for instant lookups.
02 · 5 problems
Linked Lists
A linked list stores data in nodes, each one linked to the next. Here you learn to add and remove nodes and rewire their links.
03 · 7 problems
Stacks, Queues and Binary Search
Stacks and queues keep data in a particular order; binary search finds an element in sorted data fast. Together they cover efficient handling and searching.
04 · 7 problems
Trees and Binary Search Trees
Trees are hierarchies of parent and child nodes. This is about traversing them, the depth of nodes, and how nodes relate to each other.
05 · 6 problems
Graphs
Graphs show how things relate, with nodes and edges. This covers traversals (BFS, DFS) and the relationships between nodes.
06 · 4 problems
Recursion and Backtracking
Recursion solves a problem by calling itself on smaller pieces. Backtracking tries options one by one, and steps back when it hits a dead end.
07 · 7 problems
Dynamic Programming
Dynamic programming stores the answers to subproblems that repeat, so nothing is computed twice and harder problems become fast.
08 · 4 problems
Heaps, Greedy Algorithms and Intervals
Choosing by priority, handling overlapping intervals, and picking the right option at each step: Top-K, scheduling and merging intervals.
How every problem is solved
Same nine stops for every problem, so you always know where you are.
- 01Understand the problemRestate it in your own words, with a tiny example.
- 02Brute force firstThe simplest thing that works, even if it's slow.
- 03See it in a diagramWatch the data move, step by step, before any code.
- 04Spot the patternName the trick, so you recognise it next time.
- 05The optimal solutionFix exactly what made brute force slow.
- 06Code in 6 languagesC++, Java, Python, JavaScript, Go and C#.
- 07Time and space complexityCount the steps and the memory, line by line.
- 08Edge cases and common mistakesEmpty input, duplicates, overflow: what breaks.
- 09Where it's used in real appsSpell check, Google Maps, bKash: the idea at work.