Given a rod of length n inches and an array of prices that contains prices of all pieces of a size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces.
Answers
Answered by
6
Answer:
length | 1 2 3 4 5 6 7 8
--------------------------------------------
price | 1 5 8 9 10 17 17 20
And if the prices are as following, then the maximum obtainable value is 24 (by cutting in eight pieces of length 1)
length | 1 2 3 4 5 6 7 8
--------------------------------------------
price | 3 5 8 9 10 17 17 20
Mark it brainlist answer
Similar questions