Objective: Given a rod of length n inches and a table of prices p_{i}, i=1,2,…,n, write an algorithm to find the maximum revenue r_{n} obtainable by cutting up the rod and selling the pieces.

This is very good basic problem after fibonacci sequence if you are new to Dynamic programming. We will see how the dynamic programming is used to overcome the issues with recursion(Time Complexity).

Given: Rod lengths are integers and For i=1,2,…,n we know the price p_{i} of a rod of length i inches

If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment.
__________________________________________________