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.→
July 18, 2026The CAP Theorem and Eventual Consistency, Explained11 min read

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.

#System Design
July 17, 2026Proxy and Reflect: Intercepting JavaScript Objects4 min read

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.

#JavaScript
July 16, 2026Async/Await Under the Hood: Promises in Disguise10 min read

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.

#JavaScript
July 16, 2026KMP String Matching: Search Without Backtracking5 min read

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).

#DSA
July 15, 2026Dijkstra's Algorithm: Shortest Paths With a Priority Queue4 min read

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.

#DSA
July 15, 2026Merge Intervals and Greedy Interval Scheduling5 min read

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.

#DSA
July 14, 2026Bloom Filters: Probably in the Set, Definitely Not4 min read

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.

#DSA#System Design
July 14, 2026Segment Trees: Range Queries in O(log n)5 min read

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.

#DSA
July 13, 2026Backtracking: Brute Force with an Undo Button10 min read

One template solves permutations, subsets, N-Queens, and Sudoku. Learn the choose–explore–unchoose pattern and how pruning turns exponential search into something usable.

#DSA
July 13, 2026Big-O Notation: A Practical Guide for Working Developers10 min read

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.

#DSA

202 posts · page 17 of 21