Question 14282 – Graphs-and-Tree
November 13, 2023
Question 3426 – Higher-Education-and-Politics
November 13, 2023
Question 14282 – Graphs-and-Tree
November 13, 2023
Question 3426 – Higher-Education-and-Politics
November 13, 2023

Question 14228 – Algorithms

 Define Rn< >to be the maximum amount earned by cutting a rod of length n metres 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] = 1, p[2] = 5, p[3] = 8, p[4] = 9, p[5] = 10, p[6] = 17, p[7] = 18
Which of the following statements is/are correct about R7?

Correct Answer: B

Question 18 Explanation: 
The rod length of R7 is 18.

There are 3 different possible ways to get the maximum amount.
P[6] + P[1] → 17+1 = 18
P[2] + P[2] + P[3] → 5+5+8 = 18
P[7] → 18 = 18
A
R7is achieved by three different solutions.
B
R7=18
C
R7=19
D
R7cannot be achieved by a solution consisting of three pieces.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!