Max product after a cut similar to Rod cutting
Both recursive and DP solutions.