Blog
Tutorials, guides, and insights to help you become a better developer.
![Do [1,4] and [4,5] Overlap? Answer That First](/_next/image?url=%2Fblog%2Fcovers%2Fmerge-intervals-insert-interval.png&w=1200&q=75)
LeetCode 56 merges [1,4] and [4,5]; LeetCode 435 says they do not overlap at all. Closed versus half-open ends is the one real decision in interval problems, and most interval bugs come from never making it.
AdminAugust 11, 20268 min read

Dijkstra's algorithm is four lines of greedy logic wrapped in machinery that fails quietly, so this post builds a binary-heap implementation in TypeScript, differential-tests it against Floyd-Warshall on 4,000 random graphs, and measures what the heap, the Array.shift() queue and the stale-entry check actually cost.
AdminAugust 10, 202612 min read