Cisco interview question

Rod cutting problem using DP.