Builds a grid-DFS framework with visitation and boundary handling, then applies it to island problems.
Builds a grid-DFS framework with visitation and boundary handling, then applies it to island problems.
Uses iterative inorder traversal and adjacent nodes in traversal order to solve several binary-tree problems.
Break down two challenging binary-tree problems with a three-step method: define subproblems, recurse, and combine results.
Uses binary-tree diameter to show how a global variable aggregates answers across subtrees during recursion.
Compare the subtle constraints across the Combination Sum family using one backtracking framework for candidates, deduplication, and the DP boundary.
Explains sorting, pruning, and deduplication strategies for subset, permutation, and combination problems with duplicates.
Uses candidate sets to derive clear backtracking frameworks for subsets, permutations, and combinations.
Uses anagram problems to explain how counters and multisets model character frequencies and simplify solutions.
Uses array rotation and word reversal to show how composing a familiar reverse operation simplifies algorithms.
Solve LeetCode 148 by combining list splitting, fast and slow pointers, and merge sort in one comprehensive linked-list problem.