Mridul-1-Sharma / data_structures_algos

Contribute to this repository with valid pull request to Hacktoberfest 2022 and earn awesome swags & T-shirts. This is a beginner friendly Project.
MIT License
6 stars 27 forks source link

Added Rod cutting problem in DP #32

Closed ashu2001-dina closed 1 year ago

ashu2001-dina commented 1 year ago

Problem statement - We are given a rod of size ‘N’. It can be cut into pieces. Each length of a piece has a particular price given by the price array. Our task is to find the maximum revenue that can be generated by selling the rod after cutting( if required) into pieces. DP using memoization is used for finding the solution.