Uses candidate sets to derive clear backtracking frameworks for subsets, permutations, and combinations.
65 articles
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.
Explains fast and slow pointers for cycle detection, midpoint finding, and fixed-gap linked-list problems.
Use LeetCode 11 to derive the two-pointer solution and its correctness by reasoning about the search space.
Uses Two Sum and sorted-matrix search to explain how two pointers systematically shrink a search space.
Connects binary-tree traversal with backtracking through path tracking, undoing choices, and search trees.
Uses Path Sum to explain how to define binary-tree subproblems, recursive functions, and base cases.
Introduces a two-pointer linked-list traversal framework and applies it to safely reverse a singly linked list.