Choose optimal parenthesization of matrix chain to minimize scalar multiplications (classic interval DP).
length powers
dp + split
Interval DP
min cost
cost + parenthesis
Iterate over chain lengths and inspect best split positions for each interval.
Understand the interval DP transition and how to reconstruct optimal parenthesization.