Learn DSA
A structured path through data structures and algorithms. The articles build on each other, so follow the order if you're starting fresh — or jump to whatever you want to brush up on. Most posts include interactive visualizations you can step through.
0 of 13 articles read
Progress is saved in your browser.
Foundations
How to reason about running time, recursion, and the two search/sort ideas everything else builds on.
Start here — the call stack model explains how every recursive algorithm in later phases actually runs.
Bubble, insertion, and merge sort as a first tour of comparing algorithms by their complexity.
The halve-the-problem idea, first over arrays and then as a tree structure.
AND, OR, XOR, and shifts — a small toolbox that keeps reappearing in hashing and optimization tricks.
Core data structures
The structures behind almost every practical program — and most interview questions.
Pointer manipulation basics plus the classic fast/slow-pointer cycle trick.
What actually makes lookups O(1): hashing, buckets, collisions, and resizing.
The array-backed tree that always knows its minimum — the engine behind schedulers and top-K problems.
A tree keyed by characters instead of comparisons; the structure behind autocomplete.
Algorithmic patterns
Reusable solution shapes — recognizing the pattern is most of the work in solving a new problem.
The pattern that turns a whole family of O(n²) array and string problems into O(n).
Divide-and-conquer and heap ideas applied back to sorting — partitioning shows up far beyond sort itself.
BFS and DFS are the entry point to every graph problem: reachability, shortest paths, cycles.
Overlapping subproblems, memoization, and tabulation — the pattern people find hardest, made mechanical.
Putting it together
Problems that combine several structures at once — the shape real systems (and hard interviews) take.
A hash map and a doubly linked list working together for O(1) everything — a capstone for phases 1–3.
- Backtracking and pruningComing soon
Systematic search over choice trees: permutations, subsets, and constraint problems.
- Union-Find (disjoint sets)Coming soon
Near-constant-time connectivity queries, and the trick behind Kruskal’s algorithm.
- Shortest paths: Dijkstra and friendsComing soon
Weighted graphs — where BFS stops working and priority queues take over.