Knuth works for interval DP: .
QI gives you the double bound on .
Process by length so bounds are available when needed.
Store as you compute it. The pattern: combining subproblems (like BST, matrix chain, stone merge). This improvement avoids redundant computation. The time saved can be dramatic, turning an exponential solution into polynomial time.