##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
You've compared sequences with LCS. Now solve problems where the answer depends on breaking ranges apart.
Why ranges need special thinking
Range-based states
Range definition
Dividing ranges
Why length matters
Testing core concepts
Entry problem
Endpoints determine structure
The 2D table
Match or skip
The code
Tracing the algorithm
Understanding the recurrence
summary
Classic interval DP
Understanding dimensions
What dp[i][j] means
Try all split points
The code
Tracing optimal splits
Finding optimal parenthesization
Understanding the cost
summary
LeetCode 312
Think about last
Open intervals
Last balloon
The code
Tracing the trick
Why think backwards
summary
LeetCode 132
Precompute + solve
The code
Minimum cuts trace
Finding all partitions
When to use it
Interval DP game
Game theory meets intervals
Difference formulation
Polygon DP
MCM variant
Recognizing the pattern
Preview of Tree DP
What we learned