Question DSA-DP-0059
MediumIn the rod-cutting problem with prices p[1..n], what does dp[n] = max(p[i] + dp[n − i]) express?
- A.
Cutting into equal pieces
- B.
Sorting the prices
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Dynamic Programming question
In the rod-cutting problem with prices p[1..n], what does dp[n] = max(p[i] + dp[n − i]) express?
Cutting into equal pieces
Sorting the prices
Sign up free to see the answer and a step-by-step explanation.
Selling the rod whole
Making the first cut of length i and solving the rest optimally