Explore choices
Traverse graphs, trees, choice paths, and smaller dynamic-programming states without losing the invariant.
Chapter contents
17 lessons- 01 Allocate one copy per original identity before following edges✓ Question
- 02 Count new component seeds and mark each whole region✓ Question
- 03 Reverse the edges when many starts share a few goals✓ Question
- 04 Return one subtree height after both children✓ Question
- 05 Compare aligned values and missing-child positions together✓ Question
- 06 Return transformed child roots, then reconnect them locally✓ Question
- 07 Balanced Binary Tree✓ Question
- 08 Subtree of Another Tree✓ Question
- 09 Save each increasing-index choice path, then undo the last choice✓ Question
- 10 Permutations✓ Question
- 11 Combination Sum✓ Question
- 12 Own visited cells only for the current word path✓ Question
- 13 Count disjoint final-move cases and retain only their dependencies✓ Question
- 14 Compare skipping the current item with its last compatible prefix✓ Question
- 15 Extend a snapshot of reachable sums to use each occurrence once✓ Question
- 16 Define two-prefix answers before compressing the table to rows✓ Question
- 17 Edit Distance✓ Question