Computer Sciences > GATE 2021 SET-1 > Dynamic Programming
Define Rn to be the maximum amount earned by cutting a rod of length n meters into one or more pieces of integer length and selling them. For i > 0, let p[i] denote the selling price of a rod whose length is i meters. Consider the array of prices:
p = 1, p = 5, p = 8, p = 9, p = 10, p = 17, p = 18
Which of the following statements is/are correct about R7?
A
R7 = 18
B
R7 = 19
C
R7 is achieved by three different solutions.
D
R7 cannot be achieved by a solution consisting of three pieces.

Explanation

Correct : a, c

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science