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.→Every distributed database quietly picks a side in a trade-off it can't escape: when the network partitions, you serve either possibly-stale data or an error. What CAP actually says, PACELC and the latency cost the rest of the time, the spectrum of consistency models, quorums, and how eventually consistent replicas converge.
Proxy lets you intercept fundamental operations on an object — get, set, delete, has — before they happen. It's the mechanism behind Vue's reactivity, ORMs, and API validation layers.
async/await isn't a new concurrency model — it's syntax sugar over promises and generators. Understanding the desugared version explains error handling, sequential-looking parallel bugs, and why 'async' functions always return a promise.
The naive substring search re-checks characters it's already seen and degrades to O(nm) on adversarial input. The Knuth-Morris-Pratt algorithm precomputes a failure table so the search pointer never moves backward, guaranteeing O(n + m).
BFS finds shortest paths when every edge costs the same. Dijkstra's algorithm generalizes that to weighted graphs by always expanding the closest unvisited node next — the algorithm behind every routing map you've used.
Calendar conflicts, meeting rooms, and 'maximum non-overlapping tasks' are all interval problems that collapse into a single sort-then-scan pattern once you pick the right key to sort by.
A probabilistic data structure that answers set-membership queries in constant space by allowing false positives but never false negatives — and why Chrome, Cassandra, and CDNs all rely on that trade.
When an array changes and you still need fast range sum, min, or max queries, prefix sums stop working. Segment trees answer both range queries and point updates in logarithmic time.
One template solves permutations, subsets, N-Queens, and Sudoku. Learn the choose–explore–unchoose pattern and how pruning turns exponential search into something usable.
What Big-O actually measures, how to read a function's complexity straight from its shape, and why O(n log n) beats O(n²) long before n gets big.
202 posts · page 17 of 21