Documentation for f7a5aecce5

This commit is contained in:
github-actions
2021-09-27 00:09:08 +00:00
parent 8808b968ea
commit c61d35bf51
338 changed files with 3221 additions and 1754 deletions

View File

@@ -0,0 +1,255 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: data_structures/reverse_a_linked_list.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d6/d05/reverse__a__linked__list_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">reverse_a_linked_list.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Implementation of <a href="https://simple.wikipedia.org/wiki/Linked_list" target="_blank">Reversing a single linked list</a>
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;memory&gt;</code><br />
<code>#include &lt;new&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for reverse_a_linked_list.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/da2/reverse__a__linked__list_8cpp__incl.svg" width="339" height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">data_structures::linked_list::Node</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d5/d3c/namespacedata__structures"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></td></tr>
<tr class="memdesc:d5/d3c/namespacedata__structures"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data Structures algorithms. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d3/db0/namespacelinked__list"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db0/namespacelinked__list.html">linked_list</a></td></tr>
<tr class="memdesc:d3/db0/namespacelinked__list"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for singly linked list algorithm. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d05/reverse__a__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Self-test implementations. <a href="../../d6/d05/reverse__a__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d05/reverse__a__linked__list_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function. <a href="../../d6/d05/reverse__a__linked__list_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Implementation of <a href="https://simple.wikipedia.org/wiki/Linked_list" target="_blank">Reversing a single linked list</a> </p>
<p >The linked list is a data structure used for holding a sequence of values, which can be added, displayed, reversed, or removed. </p>
<h3><a class="anchor" id="autotoc_md36"></a>
Algorithm</h3>
<p >Values can be added by iterating to the end of a list (by following the pointers) starting from the first link. Whichever link points to null is considered the last link and is pointed to the new value.</p>
<p >Linked List can be reversed by using 3 pointers: current, previous, and next_node; we keep iterating until the last node. Meanwhile, before changing to the next of current, we store it in the next_node pointer, now we store the prev pointer in the current of next, this is where the actual reversal happens. And then we move the prev and current pointers one step forward. Then the head node is made to point to the last node (prev pointer) after completion of an iteration.</p>
<p ><a href="https://drive.google.com/file/d/1pM5COF0wx-wermnNy_svtyZquaCUP2xS/view?usp=sharing" target="_blank">A graphic explanation and view of what's happening behind the scenes</a> </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> {</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <a class="code hl_function" href="../../d6/d05/reverse__a__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span>}</div>
<div class="ttc" id="areverse__a__linked__list_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d6/d05/reverse__a__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition:</b> reverse_a_linked_list.cpp:177</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d05/reverse__a__linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="562" height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">&#9670;&nbsp;</a></span>test()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void test </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Self-test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> {</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <a class="code hl_class" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a> L;</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="comment">// 1st test</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a>(11);</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a>(12);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a>(15);</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a>(10);</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a>(-12);</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a>(-20);</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a>(18);</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> assert(L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d">top</a>() == 11);</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> assert(L.<a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a>() == 18);</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70">reverseList</a>();</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="comment">// Reversal Testing</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> assert(L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d">top</a>() == 18);</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> assert(L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">traverse</a>(1) == -20);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> assert(L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">traverse</a>(2) == -12);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> assert(L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">traverse</a>(3) == 10);</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> assert(L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">traverse</a>(4) == 15);</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> assert(L.<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">traverse</a>(5) == 12);</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> assert(L.<a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a>() == 11);</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests have successfully passed!&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></div><div class="ttdef"><b>Definition:</b> linked_list.cpp:81</div></div>
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_a4649fc2c5d09dc58608cd9299db9946f"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">data_structures::linked_list::list::insert</a></div><div class="ttdeci">void insert(int32_t new_elem)</div><div class="ttdoc">Utility function that adds a new element at the end of the list.</div><div class="ttdef"><b>Definition:</b> reverse_a_linked_list.cpp:82</div></div>
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_a8b20ca89a0346c8d4193936481528c70"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70">data_structures::linked_list::list::reverseList</a></div><div class="ttdeci">void reverseList()</div><div class="ttdoc">Utility function for reversing a list.</div><div class="ttdef"><b>Definition:</b> reverse_a_linked_list.cpp:107</div></div>
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_ab2d20da40d800897c31a649799d5e43d"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d">data_structures::linked_list::list::top</a></div><div class="ttdeci">int32_t top()</div><div class="ttdoc">Utility function to find the top element of the list.</div><div class="ttdef"><b>Definition:</b> reverse_a_linked_list.cpp:123</div></div>
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_ab87eecc80068fc5a80e98e83536885f2"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">data_structures::linked_list::list::last</a></div><div class="ttdeci">std::shared_ptr&lt; link &gt; last</div><div class="ttdoc">last link on the list</div><div class="ttdef"><b>Definition:</b> linked_list.cpp:84</div></div>
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_af42071da0067130389cb12fc526ea4fe"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">data_structures::linked_list::list::traverse</a></div><div class="ttdeci">int32_t traverse(int32_t index)</div><div class="ttdoc">Utility function to find the i th element of the list.</div><div class="ttdef"><b>Definition:</b> reverse_a_linked_list.cpp:153</div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d05/reverse__a__linked__list_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="463" height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../d6/d05/reverse__a__linked__list_8cpp.html">reverse_a_linked_list.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,7 @@
var reverse__a__linked__list_8cpp =
[
[ "data_structures::linked_list::Node", "d4/d0e/classdata__structures_1_1linked__list_1_1_node.html", "d4/d0e/classdata__structures_1_1linked__list_1_1_node" ],
[ "data_structures::linked_list::list", "d1/def/classdata__structures_1_1linked__list_1_1list.html", "d1/def/classdata__structures_1_1linked__list_1_1list" ],
[ "main", "d6/d05/reverse__a__linked__list_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "test", "d6/d05/reverse__a__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
];

View File

@@ -0,0 +1,10 @@
<map id="test" name="test">
<area shape="rect" id="node1" title="Self&#45;test implementations." alt="" coords="5,129,49,156"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="139,5,211,32"/>
<area shape="rect" id="node3" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f" title="Utility function that adds a new element at the end of the list." alt="" coords="97,122,253,163"/>
<area shape="rect" id="node6" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70" title="Utility function for reversing a list." alt="" coords="97,187,253,229"/>
<area shape="rect" id="node7" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d" title="Utility function to find the top element of the list." alt="" coords="97,57,253,98"/>
<area shape="rect" id="node8" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe" title="Utility function to find the i th element of the list." alt="" coords="97,253,253,294"/>
<area shape="rect" id="node4" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="301,59,457,101"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/error/exception/what.html#" title=" " alt="" coords="309,127,449,153"/>
</map>

View File

@@ -0,0 +1 @@
f1e114e15585fa05c3aba62652f450ee

View File

@@ -0,0 +1,144 @@
<?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 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<svg width="347pt" height="225pt"
viewBox="0.00 0.00 347.00 224.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 220.5)">
<title>test</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-220.5 343,-220.5 343,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Self&#45;test implementations.">
<polygon fill="#bfbfbf" stroke="black" points="0,-104 0,-123 33,-123 33,-104 0,-104"/>
<text text-anchor="middle" x="16.5" y="-111" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="100.5,-197 100.5,-216 154.5,-216 154.5,-197 100.5,-197"/>
<text text-anchor="middle" x="127.5" y="-204" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M21.71,-123.17C29.05,-138.92 45.67,-170.09 69,-187.5 75.46,-192.32 83.2,-195.95 90.89,-198.68"/>
<polygon fill="midnightblue" stroke="midnightblue" points="89.89,-202.04 100.48,-201.68 91.98,-195.36 89.89,-202.04"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f" target="_top" xlink:title="Utility function that adds a new element at the end of the list.">
<polygon fill="white" stroke="black" points="69,-98.5 69,-128.5 186,-128.5 186,-98.5 69,-98.5"/>
<text text-anchor="start" x="77" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="127.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::insert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M33.12,-113.5C40.19,-113.5 49.1,-113.5 58.58,-113.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="58.62,-117 68.62,-113.5 58.62,-110 58.62,-117"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70" target="_top" xlink:title="Utility function for reversing a list.">
<polygon fill="white" stroke="black" points="69,-49.5 69,-79.5 186,-79.5 186,-49.5 69,-49.5"/>
<text text-anchor="start" x="77" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="127.5" y="-56.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::reverseList</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M33.17,-105.61C43.32,-100.57 56.86,-93.98 69,-88.5 72.61,-86.87 76.37,-85.22 80.16,-83.58"/>
<polygon fill="midnightblue" stroke="midnightblue" points="81.74,-86.71 89.56,-79.56 78.99,-80.27 81.74,-86.71"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d" target="_top" xlink:title="Utility function to find the top element of the list.">
<polygon fill="white" stroke="black" points="69,-147.5 69,-177.5 186,-177.5 186,-147.5 69,-147.5"/>
<text text-anchor="start" x="77" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="127.5" y="-154.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::top</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node1&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M33.23,-120.96C43.4,-125.75 56.95,-132.07 69,-137.5 73.3,-139.44 77.8,-141.44 82.29,-143.42"/>
<polygon fill="midnightblue" stroke="midnightblue" points="80.9,-146.63 91.47,-147.44 83.72,-140.22 80.9,-146.63"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe" target="_top" xlink:title="Utility function to find the i th element of the list.">
<polygon fill="white" stroke="black" points="69,-0.5 69,-30.5 186,-30.5 186,-0.5 69,-0.5"/>
<text text-anchor="start" x="77" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="127.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::traverse</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge9" class="edge">
<title>Node1&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M22.11,-103.52C29.79,-87.9 46.59,-57.59 69,-39.5 70.58,-38.23 72.23,-37.01 73.95,-35.85"/>
<polygon fill="midnightblue" stroke="midnightblue" points="76.1,-38.64 82.9,-30.51 72.52,-32.63 76.1,-38.64"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title="Utility function that checks if the list is empty.">
<polygon fill="white" stroke="black" points="222,-145.5 222,-175.5 339,-175.5 339,-145.5 222,-145.5"/>
<text text-anchor="start" x="230" y="-163.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="280.5" y="-152.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node3&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M176.69,-128.5C190.99,-132.95 206.81,-137.87 221.66,-142.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="220.66,-145.85 231.25,-145.48 222.74,-139.17 220.66,-145.85"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/error/exception/what.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="228,-106 228,-125 333,-125 333,-106 228,-106"/>
<text text-anchor="middle" x="280.5" y="-113" font-family="Helvetica,sans-Serif" font-size="10.00">std::bad_alloc::what</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node3&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M186.02,-114.26C196.27,-114.4 206.99,-114.54 217.36,-114.68"/>
<polygon fill="midnightblue" stroke="midnightblue" points="217.54,-118.18 227.59,-114.81 217.64,-111.18 217.54,-118.18"/>
</g>
<!-- Node7&#45;&gt;Node4 -->
<g id="edge7" class="edge">
<title>Node7&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M186.02,-161.74C194.46,-161.63 203.23,-161.51 211.86,-161.4"/>
<polygon fill="midnightblue" stroke="midnightblue" points="211.94,-164.9 221.89,-161.26 211.85,-157.9 211.94,-164.9"/>
</g>
<!-- Node7&#45;&gt;Node5 -->
<g id="edge8" class="edge">
<title>Node7&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M176.69,-147.5C196.83,-141.23 219.97,-134.03 239.18,-128.05"/>
<polygon fill="midnightblue" stroke="midnightblue" points="240.33,-131.36 248.84,-125.04 238.25,-124.67 240.33,-131.36"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@@ -0,0 +1,11 @@
<map id="main" name="main">
<area shape="rect" id="node1" title="Main function." alt="" coords="5,129,56,156"/>
<area shape="rect" id="node2" href="$d6/d05/reverse__a__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self&#45;test implementations." alt="" coords="104,129,148,156"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="238,5,310,32"/>
<area shape="rect" id="node4" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f" title="Utility function that adds a new element at the end of the list." alt="" coords="196,122,352,163"/>
<area shape="rect" id="node7" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70" title="Utility function for reversing a list." alt="" coords="196,187,352,229"/>
<area shape="rect" id="node8" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d" title="Utility function to find the top element of the list." alt="" coords="196,57,352,98"/>
<area shape="rect" id="node9" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe" title="Utility function to find the i th element of the list." alt="" coords="196,253,352,294"/>
<area shape="rect" id="node5" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="400,59,556,101"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/error/exception/what.html#" title=" " alt="" coords="408,127,548,153"/>
</map>

View File

@@ -0,0 +1 @@
0e3cda2cc47e596fb649684c4d05a331

View File

@@ -0,0 +1,159 @@
<?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 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="421pt" height="225pt"
viewBox="0.00 0.00 421.00 224.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 220.5)">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-220.5 417,-220.5 417,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Main function.">
<polygon fill="#bfbfbf" stroke="black" points="0,-104 0,-123 38,-123 38,-104 0,-104"/>
<text text-anchor="middle" x="19" y="-111" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d6/d05/reverse__a__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self&#45;test implementations.">
<polygon fill="white" stroke="black" points="74,-104 74,-123 107,-123 107,-104 74,-104"/>
<text text-anchor="middle" x="90.5" y="-111" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M38.26,-113.5C46.07,-113.5 55.31,-113.5 63.79,-113.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="63.95,-117 73.95,-113.5 63.95,-110 63.95,-117"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="174.5,-197 174.5,-216 228.5,-216 228.5,-197 174.5,-197"/>
<text text-anchor="middle" x="201.5" y="-204" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M95.71,-123.17C103.05,-138.92 119.67,-170.09 143,-187.5 149.46,-192.32 157.2,-195.95 164.89,-198.68"/>
<polygon fill="midnightblue" stroke="midnightblue" points="163.89,-202.04 174.48,-201.68 165.98,-195.36 163.89,-202.04"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f" target="_top" xlink:title="Utility function that adds a new element at the end of the list.">
<polygon fill="white" stroke="black" points="143,-98.5 143,-128.5 260,-128.5 260,-98.5 143,-98.5"/>
<text text-anchor="start" x="151" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="201.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::insert</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M107.12,-113.5C114.19,-113.5 123.1,-113.5 132.58,-113.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="132.62,-117 142.62,-113.5 132.62,-110 132.62,-117"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70" target="_top" xlink:title="Utility function for reversing a list.">
<polygon fill="white" stroke="black" points="143,-49.5 143,-79.5 260,-79.5 260,-49.5 143,-49.5"/>
<text text-anchor="start" x="151" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="201.5" y="-56.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::reverseList</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node2&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M107.17,-105.61C117.32,-100.57 130.86,-93.98 143,-88.5 146.61,-86.87 150.37,-85.22 154.16,-83.58"/>
<polygon fill="midnightblue" stroke="midnightblue" points="155.74,-86.71 163.56,-79.56 152.99,-80.27 155.74,-86.71"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d" target="_top" xlink:title="Utility function to find the top element of the list.">
<polygon fill="white" stroke="black" points="143,-147.5 143,-177.5 260,-177.5 260,-147.5 143,-147.5"/>
<text text-anchor="start" x="151" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="201.5" y="-154.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::top</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node2&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M107.23,-120.96C117.4,-125.75 130.95,-132.07 143,-137.5 147.3,-139.44 151.8,-141.44 156.29,-143.42"/>
<polygon fill="midnightblue" stroke="midnightblue" points="154.9,-146.63 165.47,-147.44 157.72,-140.22 154.9,-146.63"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe" target="_top" xlink:title="Utility function to find the i th element of the list.">
<polygon fill="white" stroke="black" points="143,-0.5 143,-30.5 260,-30.5 260,-0.5 143,-0.5"/>
<text text-anchor="start" x="151" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="201.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::traverse</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node9 -->
<g id="edge10" class="edge">
<title>Node2&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M96.11,-103.52C103.79,-87.9 120.59,-57.59 143,-39.5 144.58,-38.23 146.23,-37.01 147.95,-35.85"/>
<polygon fill="midnightblue" stroke="midnightblue" points="150.1,-38.64 156.9,-30.51 146.52,-32.63 150.1,-38.64"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title="Utility function that checks if the list is empty.">
<polygon fill="white" stroke="black" points="296,-145.5 296,-175.5 413,-175.5 413,-145.5 296,-145.5"/>
<text text-anchor="start" x="304" y="-163.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="354.5" y="-152.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M250.69,-128.5C264.99,-132.95 280.81,-137.87 295.66,-142.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="294.66,-145.85 305.25,-145.48 296.74,-139.17 294.66,-145.85"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/error/exception/what.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="302,-106 302,-125 407,-125 407,-106 302,-106"/>
<text text-anchor="middle" x="354.5" y="-113" font-family="Helvetica,sans-Serif" font-size="10.00">std::bad_alloc::what</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M260.02,-114.26C270.27,-114.4 280.99,-114.54 291.36,-114.68"/>
<polygon fill="midnightblue" stroke="midnightblue" points="291.54,-118.18 301.59,-114.81 291.64,-111.18 291.54,-118.18"/>
</g>
<!-- Node8&#45;&gt;Node5 -->
<g id="edge8" class="edge">
<title>Node8&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M260.02,-161.74C268.46,-161.63 277.23,-161.51 285.86,-161.4"/>
<polygon fill="midnightblue" stroke="midnightblue" points="285.94,-164.9 295.89,-161.26 285.85,-157.9 285.94,-164.9"/>
</g>
<!-- Node8&#45;&gt;Node6 -->
<g id="edge9" class="edge">
<title>Node8&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M250.69,-147.5C270.83,-141.23 293.97,-134.03 313.18,-128.05"/>
<polygon fill="midnightblue" stroke="midnightblue" points="314.33,-131.36 322.84,-125.04 312.25,-124.67 314.33,-131.36"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@@ -135,7 +135,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&lt;=n. Determine the maximum profit obtainable by cutting up the rod and selling the pieces.</p>
<h3><a class="anchor" id="autotoc_md62"></a>
<h3><a class="anchor" id="autotoc_md63"></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>