Amazon interview question

Rod cutting problem on dynamic programming