1.

Given a rod of length n and the selling prices of all pieces smaller than equal to n, find the most beneficial way of cutting the rod into smaller pieces. This problem is called the rod cutting problem. Which of these methods can be used to solve the rod cutting problem?(a) Brute force(b) Dynamic programming(c) Recursion(d) Brute force, Dynamic programming and RecursionThis question was posed to me in unit test.I would like to ask this question from Rod Cutting topic in chapter Dynamic Programming of Data Structures & Algorithms II

Answer»

Correct OPTION is (d) Brute force, Dynamic programming and RECURSION

To explain: Brute force, Dynamic programming and Recursion can be used to SOLVE the rod cutting PROBLEM.



Discussion

No Comment Found

Related InterviewSolutions