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.

1

Foundations

How to reason about running time, recursion, and the two search/sort ideas everything else builds on.

  1. Start here — the call stack model explains how every recursive algorithm in later phases actually runs.

  2. Bubble, insertion, and merge sort as a first tour of comparing algorithms by their complexity.

  3. The halve-the-problem idea, first over arrays and then as a tree structure.

  4. AND, OR, XOR, and shifts — a small toolbox that keeps reappearing in hashing and optimization tricks.

2

Core data structures

The structures behind almost every practical program — and most interview questions.

  1. Pointer manipulation basics plus the classic fast/slow-pointer cycle trick.

  2. What actually makes lookups O(1): hashing, buckets, collisions, and resizing.

  3. The array-backed tree that always knows its minimum — the engine behind schedulers and top-K problems.

  4. A tree keyed by characters instead of comparisons; the structure behind autocomplete.

3

Algorithmic patterns

Reusable solution shapes — recognizing the pattern is most of the work in solving a new problem.

  1. The pattern that turns a whole family of O(n²) array and string problems into O(n).

  2. Divide-and-conquer and heap ideas applied back to sorting — partitioning shows up far beyond sort itself.

  3. BFS and DFS are the entry point to every graph problem: reachability, shortest paths, cycles.

  4. Overlapping subproblems, memoization, and tabulation — the pattern people find hardest, made mechanical.

4

Putting it together

Problems that combine several structures at once — the shape real systems (and hard interviews) take.

  1. A hash map and a doubly linked list working together for O(1) everything — a capstone for phases 1–3.

  2. Backtracking and pruningComing soon

    Systematic search over choice trees: permutations, subsets, and constraint problems.

  3. Union-Find (disjoint sets)Coming soon

    Near-constant-time connectivity queries, and the trick behind Kruskal’s algorithm.

  4. Shortest paths: Dijkstra and friendsComing soon

    Weighted graphs — where BFS stops working and priority queues take over.