mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-24 13:53:35 +08:00
Documentation for 78fbb40e9d
This commit is contained in:
@@ -136,7 +136,7 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation of cutting a rod problem. </p>
|
||||
<p>Given a rod of length n inches and an array of prices that contains prices of all pieces of size<=n. Determine the maximum profit obtainable by cutting up the rod and selling the pieces.</p>
|
||||
<h3><a class="anchor" id="autotoc_md43"></a>
|
||||
<h3><a class="anchor" id="autotoc_md50"></a>
|
||||
Algorithm</h3>
|
||||
<p>The idea is to break the given rod into every smaller piece as possible and then check profit for each piece, by calculating maximum profit for smaller pieces we will build the solution for larger pieces in bottom-up manner.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Anmol3299">Anmol</a> </dd>
|
||||
|
||||
Reference in New Issue
Block a user