Notes lock ↩
A working notebook. Algorithm problems I've solved and system design case studies I've sketched.
-
May 12, 2026
Monotonic stack — the pattern that unlocks 'next greater element' problemsalgo
Notes on the monotonic-stack pattern, the family of problems it solves, and the template I use.
-
May 11, 2026
Designing a URL shortener at scalesys design
The classic system design question. The interesting parts are the ID scheme and the read path, not the SQL schema.
-
May 09, 2026
Distributed rate limiting — token bucket, sliding window, and the trade-offssys design
Four algorithms, four sets of trade-offs. What I'd choose and why.
-
May 08, 2026
LRU cache — clean implementation in 30 linesalgo
Doubly-linked list + hash map. The classic O(1) get/put implementation.