• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | GATE CS 2021 | Set 1 | Question 50

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]=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?

(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

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments