Writing / 63 entries
A public digital garden — bugs, breakthroughs, and the chaos of building things on the web.
Verify a BST's integrity by ensuring every node respects its upper and lower bounds during an inorder traversal.
Master both iterative and recursive approaches to reversing a singly linked list.
Master grid navigation by building intuition from 2D recursion to optimized 1D Dynamic Programming.
Track both maximum and minimum products to handle negative numbers in this DP problem.
Efficiently detect duplicates in an array using Hash Sets and Sorting.
Convert a binary tree into a string and back again using Preorder DFS.
Detect cycles in directed graphs using DFS and BFS Topological Sort (Kahn's Algorithm).
Master the O(1) space trick: using the matrix itself as storage to zero out rows and columns.