mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-17 12:02:22 +08:00
Documentation for 0fea073413
This commit is contained in:
@@ -142,7 +142,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_md69"></a>
|
||||
<h3><a class="anchor" id="autotoc_md70"></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" target="_blank">Anmol</a> </dd>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 6.0.1 (20220911.1526)
|
||||
<!-- Generated by graphviz version 6.0.2 (20221011.1828)
|
||||
-->
|
||||
<!-- Title: dynamic_programming::cut_rod::maxProfitByCuttingRod Pages: 1 -->
|
||||
<svg width="263pt" height="56pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 6.0.1 (20220911.1526)
|
||||
<!-- Generated by graphviz version 6.0.2 (20221011.1828)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="131pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 6.0.1 (20220911.1526)
|
||||
<!-- Generated by graphviz version 6.0.2 (20221011.1828)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="205pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Reference in New Issue
Block a user