Writing / 63 entries
A public digital garden — bugs, breakthroughs, and the chaos of building things on the web.
Solving the subtree matching problem with a clever serialization trick that beats 93% of submissions.
Understanding Binary Search from one of the book that I think is good for students
Mastering the LIS problem with Dynamic Programming and Binary Search optimization.
Master the Monotonic Deque approach to efficiently track the maximum value in a sliding window.
Master the art of merging intervals with a clean, three-phase linear approach.
The data structure that keeps itself sorted — automatically.
Solving a classic DFS problem with both elegant recursion and a high-performance explicit stack.
Mastering Breadth-First and Depth-First Search.