Rod-Cutting Problem
Definition
Given a rod of length , a rod of length is sold at price , find maximum revenue .
Solution
A trivial top-down recursive approach takes exponential time, as it explicitly considers each of the subproblems over and over again.
Dynamic programming solves this problem in time.
Store the optimal revenue for each length, also store the length of the first optimal cut to reconstruct the solution.