Algorithms, taught the right way.
The open-source data-structures and algorithms handbook. 120 chapters, 37 pattern decision pages, 338K+ words. Solutions in Python, Java, C++ and Go — read on the web or GitHub, no sign-up required.
Trie.
Walking down letters until the word completes itself.
n 1960, Edward Fredkin coined the name trie from retrieval
, and asked us to pronounce it like tree
to match. Nobody listens. We say try
, to keep it apart from the binary tree it isn’t. The shape, though, is exactly what you’d reach for if asked to look up a word in a dictionary in time that depends on the word, not the dictionary: one node per prefix, one edge per letter. Every search box you’ve touched today walks one of these.
Every other DSA repo has a problem.
You've starred five awesome-lists. You've bought a Premium subscription. You still don't have a coherent place to learn DSA. Here is why.
Problem dumps
NeetCode 75, Blind 75, Top 150 — lists of problems with no story binding them together. You grind, you forget, you grind again.
Pattern names without rules
"Use sliding window when…" trails off into hand-waving. Nobody tells you when fixed-window beats variable-window, or when to abandon the pattern entirely.
One language only
The site teaches in Python; your interview is in Java. The translation is on you, and the idioms don't carry over cleanly.
Solutions without intuition
Editorials explain the code that works. They rarely explain the dead ends, the trade-offs, or the recurrence you would have written first.
Locked behind a paywall
The good explanations live behind LeetCode Premium, paid courses, or someone's $40 PDF. The free tier teases substance and redirects.
A handbook, not a problem list.
Every chapter is a complete teaching article with intuition, derivations, multi-language solutions, and a routing rule that tells you when to reach for the technique. Ordered, opinionated, openly licensed.
100% content, 0% redirects
Every concept is explained here with figures we drew and trade-offs we defended. External links are supplementary, never load-bearing.
Python, Java, C++ and Go
Every canonical solution ships in four languages. Pick the one your interview uses, switch to the one you code in, sync between them.
37 routing rules
Decision pages tell you "when sliding window" or "when DFS over BFS" before you read code. Classify the problem, then solve it.
Visualizations everywhere
Every core algorithm has an interactive widget. Step through the recursion, watch the heap re-balance, see the union-find compress.
No "simply" or "just"
DP is hard. Backtracking is hard. We say so and walk through the recurrence on paper before showing the memoised version.
CC BY-SA 4.0, irrevocable
Fork it, translate it, teach from it, improve it. The ShareAlike clause keeps the chapter text open to read and remix — nobody can lock it behind a paywall.
15 parts, 120 chapters, 1128 pages.
Sequenced by dependency, not topic alphabet. Every chapter declares its prerequisites; you always know what to read next. Comparable in scope to Introduction to Algorithms — openly licensed.
Foundations
The do-not-skip prerequisites. Big-O, recursion, bit ops, math for interviews, language idioms. Most readers want to skip Part 0 and shouldn't.
Linear Data Structures
Arrays, dynamic arrays, strings, hash maps, hash collisions, stacks, queues, deques, matrix manipulation. The vocabulary every interview problem assumes you have.
Search and Sort
Linear search, binary search variants, comparison sorts, heap sort, linear sorts, quickselect. The first place algorithmic thinking shows up.
Pointers, Window, Prefix
Two-pointer techniques, fixed and variable sliding windows, prefix sums, and prefix-sum-plus-hash. The highest interview-ROI part of the curriculum.
Stack and Queue Patterns
Monotonic stacks, parentheses matching, BFS-on-deque, sliding-window maximum. Stack and queue as algorithmic primitives, not data structures.
Linked Lists
Pointer rewiring, cycle detection, k-way merge, LRU cache. Bridges to Part 13's design problems.
Trees and Heaps
Tree traversals, BSTs, balanced trees, heaps, priority queues, tries. The most-asked topic class in mid-level interviews.
Recursion and Backtracking
Recursion mental model, backtracking templates, divide-and-conquer, permutations, combinations, subset generation. Pre-DP.
Graphs
BFS, DFS, topological sort, shortest paths, MSTs, graph colouring, union-find. The largest topic-coverage part; bridges to Part 9.
Dynamic Programming
Memoization, tabulation, classic DP patterns (LIS, LCS, edit distance, knapsack), DP on trees and graphs, bitmask DP. The hardest topic class.
Greedy
Greedy proofs, exchange arguments, interval scheduling, Huffman coding.
Bit Manipulation
Bit tricks, XOR techniques, bitmask enumeration, single-number patterns.
Strings and Pattern Matching
Naive matching, KMP, Rabin-Karp, Z-algorithm, suffix arrays. Strings as first-class objects, not character arrays.
Design the Data Structure
Design problems: LRU, LFU, autocomplete, rate limiter, time-series store. Composing data structures into interview-grade systems.
Interview Framework
The interview framework: clarifying questions, brute-force-then-optimise, complexity articulation, edge cases, code walk-through, and company-specific flavours.
37 decision pages, one routing rule each.
When a problem “feels like sliding window” but you aren't sure which form, open the page that matches your hesitation. Routing rule first, discriminator in one sentence, signature problem at the end.
Recursion vs iteration: when does iteration matter
Memoization vs tabulation, top-down vs bottom-up
Hash map vs sorted map: O(1) average vs O(log n) ordered
Array vs linked list: when each wins
Stack vs queue vs deque, picking the right LIFO/FIFO
Heap vs sorted array vs balanced BST vs language-sorted-set
5 LeetCode walkthroughs, full fidelity.
One canonical problem at a time. Brute force first, named for what it costs. The optimisation, derived from a single sentence about why the inner loop is replaceable. The duplicate-handling rule most submissions get wrong. Same voice as the curriculum, zoomed in on one problem instead of a family.
Two Sum
A worked walkthrough of LC 1 — brute force, optimisation, and the bugs that bite under interview pressure.
Longest Substring Without Repeating Characters
A worked walkthrough of LC 3 — brute force, optimisation, and the bugs that bite under interview pressure.
Longest Palindromic Substring
A worked walkthrough of LC 5 — brute force, optimisation, and the bugs that bite under interview pressure.
Container With Most Water
A worked walkthrough of LC 11 — brute force, optimisation, and the bugs that bite under interview pressure.
3Sum
A worked walkthrough of LC 15 — brute force, optimisation, and the bugs that bite under interview pressure.
The principles.
These are not aspirational. They are enforced in code review and CI.
One hundred percent inline content
Every chapter is a full teaching article. No "watch this video for the explanation." If a concept matters, it is explained here, with figures, derivations, and worked examples.
Patterns before problems
Each technique gets a decision page that tells you when to reach for it. Routing rule, discriminator, signature problem. Then you grind.
Code in four languages
Every canonical solution ships in Python, Java, C++ and Go. Idioms translated, not transliterated. Pick yours and switch back when you want a second view of the same idea.
Honest about complexity
We don't use the words "simply" or "just." DP is hard. Hard problems get the page space they need; we walk through the recurrence on paper before showing the memoised version.
Modern and maintained
Every chapter has a date_updated. Out-of-date complexity claims and stale interview tropes get flagged in review. The handbook moves with the field.
Open-licensed, readable without a sign-up
CC BY-SA 4.0 for content, MIT for code. The ShareAlike clause keeps the chapter text itself open to read and remix — nobody can lock it behind a paywall. No tracking, no email gate, no ads.
Ready to solve?
Start from the foundations or jump straight to the highest-ROI patterns. The chapters are open to read — no sign-up, no paywall — so you can go as deep as you like.