SarthakKeshari / CPP-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 132 forks source link

Cutting a Rod #399

Closed PrakharRathore123 closed 2 years ago

PrakharRathore123 commented 2 years ago

Enter your question -

Given a rod of length n inches and an array of prices that includes prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces.

Test case-

example- if the length of the rod is 8 and the values of different pieces {1 5 8 9 10 17 17 20} then the maximum obtainable value is 22. by cutting in two pieces of lengths 2 and 6

Enter link to the question(if question belongs to any online platform) -

https://www.interviewbit.com/problems/rod-cutting/

Tags for the question(eg - Array, Basic, Stack, etc.) -

Array , Recursion , Dynamic programming

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly assign me this issue

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly assign me this issue

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly add your solution to "GeeksForGeeks" folder. Deadline - 10/10/2021

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly mention the link to the online platform where the question belongs to.

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly check

SarthakKeshari commented 2 years ago

Kindly add it to "GeeksForGeeks" folder