Blog
Notes on data structures & algorithms, system design, and things I learn along the way.
Learning DSA? Follow the structured path — ordered articles from recursion to dynamic programming.→LIFO and FIFO look trivial until you notice they power your call stack, undo history, browser navigation, and every BFS. Plus the classic interview patterns for each.
Build systems, package managers, and course schedulers all answer the same question: what order satisfies every dependency? Kahn's algorithm answers it — and detects impossible cycles.
The disjoint set union structure answers 'are these two connected?' in near-O(1) — with two optimizations you can write in twenty lines. Includes Kruskal's MST and cycle detection.
Why `hash % N` falls apart the moment you add a server, and how consistent hashing moves only a fraction of your keys when the cluster changes.
The protocol behind for...of, the spread operator, and async/await — plus generator functions, which can pause mid-execution and resume exactly where they left off.
The operators every developer half-remembers — AND, OR, XOR, shifts — and the handful of tricks that turn them into fast, elegant solutions.
The data structure behind autocomplete and spellcheck. How a trie stores words as shared character paths, and why lookups cost the length of the word — not the size of the dictionary.
How a heap keeps the smallest (or largest) element one lookup away, why it's stored in a plain array, and the sift-up/sift-down operations that keep it valid.
Why linked lists still matter, and the two-pointer trick that detects a loop in one pass with no extra memory — the famous tortoise and hare.
DP is not a scary black box — it's recursion that stops repeating itself. Follow one problem from exponential recursion to a linear table, one cell at a time.
148 posts · page 13 of 15