Documentation for f7a5aecce5
@@ -103,6 +103,7 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
|
||||
<tr id="row_1_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_1_0_" class="arrow" onclick="toggleFolder('1_0_')">►</span><span class="icona"><span class="icon">N</span></span><b>linked_list</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_0_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/d9d/classdata__structures_1_1linked__list_1_1link.html" target="_self">link</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html" target="_self">list</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/d0e/classdata__structures_1_1linked__list_1_1_node.html" target="_self">Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_1_1_" class="arrow" onclick="toggleFolder('1_1_')">►</span><span class="icona"><span class="icon">N</span></span><b>list_array</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_0_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/dab/structdata__structures_1_1list__array_1_1list.html" target="_self">list</a></td><td class="desc">Structure of List with supporting methods </td></tr>
|
||||
<tr id="row_1_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_1_2_" class="arrow" onclick="toggleFolder('1_2_')">►</span><span class="icona"><span class="icon">N</span></span><b>queue_using_array</b></td><td class="desc"></td></tr>
|
||||
@@ -201,12 +202,12 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
|
||||
<tr id="row_30_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d05/class_min_heap.html" target="_self">MinHeap</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_31_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d29/struct_min_heap_node.html" target="_self">MinHeapNode</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_32_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d77/structmst.html" target="_self">mst</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_33_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/da1/structnode.html" target="_self">node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_34_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d8b/struct_node.html" target="_self">Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_33_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d8b/struct_node.html" target="_self">Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_34_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/da1/structnode.html" target="_self">node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_35_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dc8/struct_point.html" target="_self">Point</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_36_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d1b/structquery.html" target="_self">query</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_37_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/da9/classqueue.html" target="_self">queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_38_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/db5/struct_queue.html" target="_self">Queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_37_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/db5/struct_queue.html" target="_self">Queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_38_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/da9/classqueue.html" target="_self">queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_39_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d72/class_r_btree.html" target="_self">RBtree</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_40_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/db4/struct_segment_intersection.html" target="_self">SegmentIntersection</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_41_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d4f/class_solution.html" target="_self">Solution</a></td><td class="desc"></td></tr>
|
||||
|
||||
@@ -9,7 +9,8 @@ var annotated_dup =
|
||||
[ "data_structures", "d5/d3c/namespacedata__structures.html", [
|
||||
[ "linked_list", null, [
|
||||
[ "link", "de/d9d/classdata__structures_1_1linked__list_1_1link.html", "de/d9d/classdata__structures_1_1linked__list_1_1link" ],
|
||||
[ "list", "d1/def/classdata__structures_1_1linked__list_1_1list.html", "d1/def/classdata__structures_1_1linked__list_1_1list" ]
|
||||
[ "list", "d1/def/classdata__structures_1_1linked__list_1_1list.html", "d1/def/classdata__structures_1_1linked__list_1_1list" ],
|
||||
[ "Node", "d4/d0e/classdata__structures_1_1linked__list_1_1_node.html", "d4/d0e/classdata__structures_1_1linked__list_1_1_node" ]
|
||||
] ],
|
||||
[ "list_array", null, [
|
||||
[ "list", "d5/dab/structdata__structures_1_1list__array_1_1list.html", "d5/dab/structdata__structures_1_1list__array_1_1list" ]
|
||||
@@ -136,12 +137,12 @@ var annotated_dup =
|
||||
[ "MinHeap", "d2/d05/class_min_heap.html", "d2/d05/class_min_heap" ],
|
||||
[ "MinHeapNode", "d5/d29/struct_min_heap_node.html", null ],
|
||||
[ "mst", "d1/d77/structmst.html", null ],
|
||||
[ "node", "d5/da1/structnode.html", "d5/da1/structnode" ],
|
||||
[ "Node", "db/d8b/struct_node.html", null ],
|
||||
[ "node", "d5/da1/structnode.html", "d5/da1/structnode" ],
|
||||
[ "Point", "d8/dc8/struct_point.html", "d8/dc8/struct_point" ],
|
||||
[ "query", "dd/d1b/structquery.html", null ],
|
||||
[ "queue", "db/da9/classqueue.html", "db/da9/classqueue" ],
|
||||
[ "Queue", "dc/db5/struct_queue.html", null ],
|
||||
[ "queue", "db/da9/classqueue.html", "db/da9/classqueue" ],
|
||||
[ "RBtree", "d8/d72/class_r_btree.html", null ],
|
||||
[ "SegmentIntersection", "d4/db4/struct_segment_intersection.html", "d4/db4/struct_segment_intersection" ],
|
||||
[ "Solution", "dd/d4f/class_solution.html", null ],
|
||||
|
||||
@@ -130,13 +130,13 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
|
||||
<dd><a class="el" href="d2/d05/class_min_heap.html">MinHeap</a></dd><dd><a class="el" href="d5/d29/struct_min_heap_node.html">MinHeapNode</a></dd><dd><a class="el" href="d1/d77/structmst.html">mst</a></dd></dl>
|
||||
<dl class="classindex odd">
|
||||
<dt class="alphachar"><a id="letter_N" name="letter_N">N</a></dt>
|
||||
<dd><a class="el" href="d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">NCRModuloP</a> (math::ncr_modulo_p)</dd><dd><a class="el" href="d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html">NeuralNetwork</a> (machine_learning::neural_network)</dd><dd><a class="el" href="d9/d49/structdata__structures_1_1_node.html">Node</a> (<a class="el" href="d5/d3c/namespacedata__structures.html">data_structures</a>)</dd><dd><a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html">Node</a> (data_structures::tree_234)</dd><dd><a class="el" href="d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html">Trie::Node</a> (data_structures::trie_using_hashmap)</dd><dd><a class="el" href="d5/da1/structnode.html">node</a></dd><dd><a class="el" href="db/d8b/struct_node.html">Node</a></dd><dd><a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html">Node</a> (operations_on_datastructures::inorder_traversal_of_bst)</dd><dd><a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html">Node</a> (others::iterative_tree_traversals)</dd><dd><a class="el" href="d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">perSegTree::Node</a> (<a class="el" href="dd/d69/namespacerange__queries.html">range_queries</a>)</dd><dd><a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html">Node</a> (search::sublist_search)</dd></dl>
|
||||
<dd><a class="el" href="d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">NCRModuloP</a> (math::ncr_modulo_p)</dd><dd><a class="el" href="d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html">NeuralNetwork</a> (machine_learning::neural_network)</dd><dd><a class="el" href="d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">Node</a> (data_structures::linked_list)</dd><dd><a class="el" href="d9/d49/structdata__structures_1_1_node.html">Node</a> (<a class="el" href="d5/d3c/namespacedata__structures.html">data_structures</a>)</dd><dd><a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html">Node</a> (data_structures::tree_234)</dd><dd><a class="el" href="d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html">Trie::Node</a> (data_structures::trie_using_hashmap)</dd><dd><a class="el" href="db/d8b/struct_node.html">Node</a></dd><dd><a class="el" href="d5/da1/structnode.html">node</a></dd><dd><a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html">Node</a> (operations_on_datastructures::inorder_traversal_of_bst)</dd><dd><a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html">Node</a> (others::iterative_tree_traversals)</dd><dd><a class="el" href="d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">perSegTree::Node</a> (<a class="el" href="dd/d69/namespacerange__queries.html">range_queries</a>)</dd><dd><a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html">Node</a> (search::sublist_search)</dd></dl>
|
||||
<dl class="classindex even">
|
||||
<dt class="alphachar"><a id="letter_P" name="letter_P">P</a></dt>
|
||||
<dd><a class="el" href="d8/d28/classrange__queries_1_1per_seg_tree.html">perSegTree</a> (<a class="el" href="dd/d69/namespacerange__queries.html">range_queries</a>)</dd><dd><a class="el" href="d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">Point</a> (<a class="el" href="df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html">ciphers::elliptic_curve_key_exchange</a>)</dd><dd><a class="el" href="d9/d5a/structgeometry_1_1jarvis_1_1_point.html">Point</a> (geometry::jarvis)</dd><dd><a class="el" href="d8/dc8/struct_point.html">Point</a></dd></dl>
|
||||
<dl class="classindex odd">
|
||||
<dt class="alphachar"><a id="letter_Q" name="letter_Q">Q</a></dt>
|
||||
<dd><a class="el" href="dd/d1b/structquery.html">query</a></dd><dd><a class="el" href="db/da9/classqueue.html">queue</a></dd><dd><a class="el" href="dc/db5/struct_queue.html">Queue</a></dd><dd><a class="el" href="d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html">Queue_Array</a> (data_structures::queue_using_array)</dd></dl>
|
||||
<dd><a class="el" href="dd/d1b/structquery.html">query</a></dd><dd><a class="el" href="dc/db5/struct_queue.html">Queue</a></dd><dd><a class="el" href="db/da9/classqueue.html">queue</a></dd><dd><a class="el" href="d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html">Queue_Array</a> (data_structures::queue_using_array)</dd></dl>
|
||||
<dl class="classindex even">
|
||||
<dt class="alphachar"><a id="letter_R" name="letter_R">R</a></dt>
|
||||
<dd><a class="el" href="d8/d72/class_r_btree.html">RBtree</a></dd><dd><a class="el" href="d0/d58/classgraph_1_1_rooted_tree.html">RootedTree</a> (<a class="el" href="df/dce/namespacegraph.html">graph</a>)</dd></dl>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<map id="data_structures::linked_list::Node" name="data_structures::linked_list::Node">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,161,47"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
7f3ae73e1b0aedfcfafbe14acee6c016
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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: data_structures::linked_list::Node Pages: 1 -->
|
||||
<svg width="165pt" height="39pt"
|
||||
viewBox="0.00 0.00 165.00 39.00" 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 35)">
|
||||
<title>data_structures::linked_list::Node</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 161,-35 161,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-30.5 117,-30.5 117,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::Node</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M127.44,-19.57C132.14,-18.63 135,-17.28 135,-15.5 135,-12.66 127.68,-10.89 117.2,-10.2"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="126.71,-16.13 117.2,-20.8 127.54,-23.08 126.71,-16.13"/>
|
||||
<text text-anchor="middle" x="146" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00"> next</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,4 @@
|
||||
<map id="data_structures::linked_list::list" name="data_structures::linked_list::list">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,109,161,151"/>
|
||||
<area shape="rect" id="node2" href="$d4/d0e/classdata__structures_1_1linked__list_1_1_node.html" title=" " alt="" coords="5,5,161,47"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
85368f38fcd85221d79e39a84ad2b9f8
|
||||
@@ -0,0 +1,47 @@
|
||||
<?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: data_structures::linked_list::list Pages: 1 -->
|
||||
<svg width="165pt" height="117pt"
|
||||
viewBox="0.00 0.00 165.00 117.00" 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 113)">
|
||||
<title>data_structures::linked_list::list</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-113 161,-113 161,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-30.5 117,-30.5 117,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="0,-78.5 0,-108.5 117,-108.5 117,-78.5 0,-78.5"/>
|
||||
<text text-anchor="start" x="8" y="-96.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58.5" y="-85.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::Node</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node2->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M58.5,-68.09C58.5,-55.76 58.5,-41.22 58.5,-30.73"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="55,-68.2 58.5,-78.2 62,-68.21 55,-68.2"/>
|
||||
<text text-anchor="middle" x="71.5" y="-52" font-family="Helvetica,sans-Serif" font-size="10.00"> head</text>
|
||||
</g>
|
||||
<!-- Node2->Node2 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node2</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M127.44,-98.65C132.14,-97.47 135,-95.75 135,-93.5 135,-89.9 127.68,-87.66 117.2,-86.79"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="126.56,-95.24 117.2,-100.21 127.61,-102.16 126.56,-95.24"/>
|
||||
<text text-anchor="middle" x="146" y="-91" font-family="Helvetica,sans-Serif" font-size="10.00"> next</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -137,22 +137,22 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of <a href="https://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm" target="_blank">Hopcroft–Karp</a> algorithm. </p>
|
||||
<p >The Hopcroft–Karp algorithm is an algorithm that takes as input a bipartite graph and produces as output a maximum cardinality matching, it runs in O(E√V) time in worst case.</p>
|
||||
<h3><a class="anchor" id="autotoc_md67"></a>
|
||||
<h3><a class="anchor" id="autotoc_md68"></a>
|
||||
Bipartite graph</h3>
|
||||
<p >A bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets U and V such that every edge connects a vertex in U to one in V. Vertex sets U and V are usually called the parts of the graph. Equivalently, a bipartite graph is a graph that does not contain any odd-length cycles.</p>
|
||||
<h3><a class="anchor" id="autotoc_md68"></a>
|
||||
<h3><a class="anchor" id="autotoc_md69"></a>
|
||||
Matching and Not-Matching edges</h3>
|
||||
<p >Given a matching M, edges that are part of matching are called Matching edges and edges that are not part of M (or connect free nodes) are called Not-Matching edges.</p>
|
||||
<h3><a class="anchor" id="autotoc_md69"></a>
|
||||
<h3><a class="anchor" id="autotoc_md70"></a>
|
||||
Maximum cardinality matching</h3>
|
||||
<p >Given a bipartite graphs G = ( V = ( X , Y ) , E ) whose partition has the parts X and Y, with E denoting the edges of the graph, the goal is to find a matching with as many edges as possible. Equivalently, a matching that covers as many vertices as possible.</p>
|
||||
<h3><a class="anchor" id="autotoc_md70"></a>
|
||||
<h3><a class="anchor" id="autotoc_md71"></a>
|
||||
Augmenting paths</h3>
|
||||
<p >Given a matching M, an augmenting path is an alternating path that starts from and ends on free vertices. All single edge paths that start and end with free vertices are augmenting paths.</p>
|
||||
<h3><a class="anchor" id="autotoc_md71"></a>
|
||||
<h3><a class="anchor" id="autotoc_md72"></a>
|
||||
Concept</h3>
|
||||
<p >A matching M is not maximum if there exists an augmenting path. It is also true other way, i.e, a matching is maximum if no augmenting path exists.</p>
|
||||
<h3><a class="anchor" id="autotoc_md72"></a>
|
||||
<h3><a class="anchor" id="autotoc_md73"></a>
|
||||
Algorithm</h3>
|
||||
<p >1) Initialize the Maximal Matching M as empty. 2) While there exists an Augmenting Path P Remove matching edges of P from M and add not-matching edges of P to M (This increases size of M by 1 as P starts and ends with a free vertex i.e. a node that is not part of matching.) 3) Return M.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Krishnapal4050" target="_blank">Krishna Pal Deora</a> </dd></dl>
|
||||
|
||||
@@ -97,12 +97,19 @@ $(document).ready(function(){initNavTree('d1/def/classdata__structures_1_1linked
|
||||
<div class="headertitle"><div class="title">data_structures::linked_list::list Class Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for data_structures::linked_list::list:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d15/classdata__structures_1_1linked__list_1_1list__coll__graph.svg" width="220" height="156"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a50e209b55b83622254177050945e7826"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a50e209b55b83622254177050945e7826">list</a> ()</td></tr>
|
||||
<tr class="separator:a50e209b55b83622254177050945e7826"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae8424a4fce3d483f7c85d6f6a5c79a1a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a> ()</td></tr>
|
||||
<tr class="memdesc:ae8424a4fce3d483f7c85d6f6a5c79a1a"><td class="mdescLeft"> </td><td class="mdescRight">Utility function that checks if the list is empty. <a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae8424a4fce3d483f7c85d6f6a5c79a1a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad585670a392c7e842c992d088093dff5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ad585670a392c7e842c992d088093dff5">push_back</a> (int new_elem)</td></tr>
|
||||
<tr class="separator:ad585670a392c7e842c992d088093dff5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -117,6 +124,29 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:af0981944884c6dc19361ff67451261c9"><td class="memItemLeft" align="right" valign="top"><a id="af0981944884c6dc19361ff67451261c9" name="af0981944884c6dc19361ff67451261c9"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>reverse</b> ()</td></tr>
|
||||
<tr class="separator:af0981944884c6dc19361ff67451261c9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a50e209b55b83622254177050945e7826"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a50e209b55b83622254177050945e7826">list</a> ()</td></tr>
|
||||
<tr class="separator:a50e209b55b83622254177050945e7826"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a454ab4918f579869dfed4bb420a3f897"><td class="memItemLeft" align="right" valign="top"><a id="a454ab4918f579869dfed4bb420a3f897" name="a454ab4918f579869dfed4bb420a3f897"></a>
|
||||
bool </td><td class="memItemRight" valign="bottom"><b>isEmpty</b> ()</td></tr>
|
||||
<tr class="separator:a454ab4918f579869dfed4bb420a3f897"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4649fc2c5d09dc58608cd9299db9946f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a> (int32_t new_elem)</td></tr>
|
||||
<tr class="memdesc:a4649fc2c5d09dc58608cd9299db9946f"><td class="mdescLeft"> </td><td class="mdescRight">Utility function that adds a new element at the end of the list. <a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">More...</a><br /></td></tr>
|
||||
<tr class="separator:a4649fc2c5d09dc58608cd9299db9946f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8b20ca89a0346c8d4193936481528c70"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70">reverseList</a> ()</td></tr>
|
||||
<tr class="memdesc:a8b20ca89a0346c8d4193936481528c70"><td class="mdescLeft"> </td><td class="mdescRight">Utility function for reversing a list. <a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70">More...</a><br /></td></tr>
|
||||
<tr class="separator:a8b20ca89a0346c8d4193936481528c70"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1313837c0e9ec67fd9fbd17987e2d615"><td class="memItemLeft" align="right" valign="top"><a id="a1313837c0e9ec67fd9fbd17987e2d615" name="a1313837c0e9ec67fd9fbd17987e2d615"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>display</b> ()</td></tr>
|
||||
<tr class="separator:a1313837c0e9ec67fd9fbd17987e2d615"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab2d20da40d800897c31a649799d5e43d"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d">top</a> ()</td></tr>
|
||||
<tr class="memdesc:ab2d20da40d800897c31a649799d5e43d"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to find the top element of the list. <a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d">More...</a><br /></td></tr>
|
||||
<tr class="separator:ab2d20da40d800897c31a649799d5e43d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a18a6625cd2a3bf8a27dc5567f5e4eb04"><td class="memItemLeft" align="right" valign="top"><a id="a18a6625cd2a3bf8a27dc5567f5e4eb04" name="a18a6625cd2a3bf8a27dc5567f5e4eb04"></a>
|
||||
int32_t </td><td class="memItemRight" valign="bottom"><b>last</b> ()</td></tr>
|
||||
<tr class="separator:a18a6625cd2a3bf8a27dc5567f5e4eb04"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af42071da0067130389cb12fc526ea4fe"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">traverse</a> (int32_t index)</td></tr>
|
||||
<tr class="memdesc:af42071da0067130389cb12fc526ea4fe"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to find the i th element of the list. <a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">More...</a><br /></td></tr>
|
||||
<tr class="separator:af42071da0067130389cb12fc526ea4fe"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
|
||||
Private Attributes</h2></td></tr>
|
||||
@@ -124,16 +154,18 @@ Private Attributes</h2></td></tr>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="../../de/d9d/classdata__structures_1_1linked__list_1_1link.html">link</a> > </td><td class="memItemRight" valign="bottom"><b>first</b></td></tr>
|
||||
<tr class="memdesc:aa3801cea564a3b3bb7b03abfffdcf1e1"><td class="mdescLeft"> </td><td class="mdescRight">link before the actual first element <br /></td></tr>
|
||||
<tr class="separator:aa3801cea564a3b3bb7b03abfffdcf1e1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae8a5aa5c6dbbc5b882030b52619dd1a3"><td class="memItemLeft" align="right" valign="top"><a id="ae8a5aa5c6dbbc5b882030b52619dd1a3" name="ae8a5aa5c6dbbc5b882030b52619dd1a3"></a>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="../../de/d9d/classdata__structures_1_1linked__list_1_1link.html">link</a> > </td><td class="memItemRight" valign="bottom"><b>last</b></td></tr>
|
||||
<tr class="memdesc:ae8a5aa5c6dbbc5b882030b52619dd1a3"><td class="mdescLeft"> </td><td class="mdescRight">last link on the list <br /></td></tr>
|
||||
<tr class="separator:ae8a5aa5c6dbbc5b882030b52619dd1a3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab87eecc80068fc5a80e98e83536885f2"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="../../de/d9d/classdata__structures_1_1linked__list_1_1link.html">link</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a></td></tr>
|
||||
<tr class="memdesc:ab87eecc80068fc5a80e98e83536885f2"><td class="mdescLeft"> </td><td class="mdescRight">last link on the list <a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">More...</a><br /></td></tr>
|
||||
<tr class="separator:ab87eecc80068fc5a80e98e83536885f2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad7e7823ae52c4ebf3b85a1bec096be5d"><td class="memItemLeft" align="right" valign="top"><a id="ad7e7823ae52c4ebf3b85a1bec096be5d" name="ad7e7823ae52c4ebf3b85a1bec096be5d"></a>
|
||||
<a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">Node</a> * </td><td class="memItemRight" valign="bottom"><b>head</b></td></tr>
|
||||
<tr class="separator:ad7e7823ae52c4ebf3b85a1bec096be5d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >A list class containing a sequence of links </p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a50e209b55b83622254177050945e7826" name="a50e209b55b83622254177050945e7826"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a50e209b55b83622254177050945e7826">◆ </a></span>list()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a50e209b55b83622254177050945e7826">◆ </a></span>list() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -159,10 +191,39 @@ Private Attributes</h2></td></tr>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="comment">// Initialize the first link</span></div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a> = std::make_shared<link>();</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="comment">// Initialize the last link with the first link</span></div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_aa3801cea564a3b3bb7b03abfffdcf1e1"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">data_structures::linked_list::list::first</a></div><div class="ttdeci">std::shared_ptr< link > first</div><div class="ttdoc">link before the actual first element</div><div class="ttdef"><b>Definition:</b> linked_list.cpp:83</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_ae8a5aa5c6dbbc5b882030b52619dd1a3"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">data_structures::linked_list::list::last</a></div><div class="ttdeci">std::shared_ptr< link > 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_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< link > last</div><div class="ttdoc">last link on the list</div><div class="ttdef"><b>Definition:</b> linked_list.cpp:84</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a50e209b55b83622254177050945e7826" name="a50e209b55b83622254177050945e7826"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a50e209b55b83622254177050945e7826">◆ </a></span>list() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">data_structures::linked_list::list::list </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >List constructor. Initializes the first link. </p>
|
||||
<div class="fragment"><div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> head = <span class="keyword">nullptr</span>; <span class="comment">// Initialize the first link</span></div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -194,7 +255,7 @@ Private Attributes</h2></td></tr>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> }</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</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_ae8424a4fce3d483f7c85d6f6a5c79a1a"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">data_structures::linked_list::list::isEmpty</a></div><div class="ttdeci">bool isEmpty()</div><div class="ttdef"><b>Definition:</b> linked_list.cpp:111</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_ae8424a4fce3d483f7c85d6f6a5c79a1a"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">data_structures::linked_list::list::isEmpty</a></div><div class="ttdeci">bool isEmpty()</div><div class="ttdoc">Utility function that checks if the list is empty.</div><div class="ttdef"><b>Definition:</b> linked_list.cpp:111</div></div>
|
||||
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -233,10 +294,10 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> }</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> t = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>;</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> to_be_removed = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">while</span> (t != <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> && t->succ()->val() != old_elem) {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">while</span> (t != <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> && t->succ()->val() != old_elem) {</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> t = t->succ();</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> }</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">if</span> (t == <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>) {</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">if</span> (t == <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a>) {</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Element not found\n"</span>;</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> }</div>
|
||||
@@ -244,10 +305,10 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> t->succ() = t->succ()->succ();</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> to_be_removed.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr/reset.html">reset</a>();</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">if</span> (t->succ() == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = t;</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> = t;</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> }</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a> == <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>){</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a> == <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a>){</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> }</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span>}</div>
|
||||
<div class="ttc" id="areset_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr/reset.html">std::shared_ptr::reset</a></div><div class="ttdeci">T reset(T... args)</div></div>
|
||||
@@ -258,6 +319,60 @@ Here is the call graph for this function:</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a4649fc2c5d09dc58608cd9299db9946f" name="a4649fc2c5d09dc58608cd9299db9946f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a4649fc2c5d09dc58608cd9299db9946f">◆ </a></span>insert()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void list::insert </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int32_t </td>
|
||||
<td class="paramname"><em>n</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function that adds a new element at the end of the list. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">new_elem</td><td>element be added at the end of the list </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> {</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">try</span> {</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *new_node = <span class="keyword">new</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a>();</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *temp = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> new_node->val = n;</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> new_node->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> head = new_node;</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> temp = head;</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">while</span> (temp->next != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> temp = temp->next;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> temp->next = new_node;</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> } <span class="keywordflow">catch</span> (<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/new/bad_alloc.html">std::bad_alloc</a> &exception) {</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cerr</a> << <span class="stringliteral">"bad_alloc detected: "</span> << exception.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>() << <span class="stringliteral">"\n"</span>;</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span>}</div>
|
||||
<div class="ttc" id="abad_alloc_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/new/bad_alloc.html">std::bad_alloc</a></div></div>
|
||||
<div class="ttc" id="astruct_node_html"><div class="ttname"><a href="../../db/d8b/struct_node.html">Node</a></div><div class="ttdef"><b>Definition:</b> linkedlist_implentation_usingarray.cpp:14</div></div>
|
||||
<div class="ttc" id="awhat_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/exception/what.html">std::bad_alloc::what</a></div><div class="ttdeci">T what(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="../../d1/def/classdata__structures_1_1linked__list_1_1list_a4649fc2c5d09dc58608cd9299db9946f_cgraph.svg" width="371" height="104"><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="ae8424a4fce3d483f7c85d6f6a5c79a1a" name="ae8424a4fce3d483f7c85d6f6a5c79a1a"></a>
|
||||
@@ -274,11 +389,17 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function that checks if the list is empty. </p>
|
||||
<p >function checks if list is empty </p><dl class="section return"><dt>Returns</dt><dd>true if list is empty </dd>
|
||||
<dd>
|
||||
false if list is not empty </dd></dl>
|
||||
false if list is not empty</dd>
|
||||
<dd>
|
||||
true if the list is empty </dd>
|
||||
<dd>
|
||||
false if the list is not empty </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> {</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
@@ -311,10 +432,10 @@ false if list is not empty </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> {</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ() = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ();</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ();</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>->succ() = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>->succ();</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a>->succ() = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a>->succ();</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -350,7 +471,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="fragment"><div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> {</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ() = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ();</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ();</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> t = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> t->succ() = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ();</div>
|
||||
@@ -364,6 +485,38 @@ Here is the call graph for this function:</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a8b20ca89a0346c8d4193936481528c70" name="a8b20ca89a0346c8d4193936481528c70"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8b20ca89a0346c8d4193936481528c70">◆ </a></span>reverseList()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void list::reverseList </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function for reversing a list. </p>
|
||||
<p >Using the current, previous, and next pointer. </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> {</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *curr = head;</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/prev.html">prev</a> = <span class="keyword">nullptr</span>, *next_node = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">while</span> (curr != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> next_node = curr->next;</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> curr->next = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/prev.html">prev</a>;</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/prev.html">prev</a> = curr;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> curr = next_node;</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> }</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> head = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/prev.html">prev</a>;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span>}</div>
|
||||
<div class="ttc" id="aprev_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/prev.html">std::prev</a></div><div class="ttdeci">T prev(T... args)</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a098be172c737f236763afdb8cada4835" name="a098be172c737f236763afdb8cada4835"></a>
|
||||
@@ -394,10 +547,10 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> }</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> t = <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>;</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">while</span> (t != <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> && t->succ()->val() != find_elem) {</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">while</span> (t != <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a> && t->succ()->val() != find_elem) {</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> t = t->succ();</div>
|
||||
<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> <span class="keywordflow">if</span> (t == <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>) {</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keywordflow">if</span> (t == <a class="code hl_variable" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a>) {</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Element not found\n"</span>;</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> }</div>
|
||||
@@ -413,8 +566,109 @@ Here is the call graph for this function:</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<a id="ab2d20da40d800897c31a649799d5e43d" name="ab2d20da40d800897c31a649799d5e43d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab2d20da40d800897c31a649799d5e43d">◆ </a></span>top()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int32_t list::top </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function to find the top element of the list. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the top element of the list </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> {</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">try</span> {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">return</span> head->val;</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> }</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> } <span class="keywordflow">catch</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a> &e) {</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cerr</a> << <span class="stringliteral">"List is empty"</span> << e.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>() << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>}</div>
|
||||
<div class="ttc" id="aexception_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a></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="../../d1/def/classdata__structures_1_1linked__list_1_1list_ab2d20da40d800897c31a649799d5e43d_cgraph.svg" width="371" height="104"><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="af42071da0067130389cb12fc526ea4fe" name="af42071da0067130389cb12fc526ea4fe"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af42071da0067130389cb12fc526ea4fe">◆ </a></span>traverse()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int32_t list::traverse </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int32_t </td>
|
||||
<td class="paramname"><em>index</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function to find the i th element of the list. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the i th element of the list </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> {</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *current = head;</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordtype">int</span> count = 0;</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">while</span> (current != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (count == index) {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">return</span> (current->val);</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> count++;</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> current = current->next;</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="comment">/* if we get to this line,the caller was asking for a non-existent element</span></div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span><span class="comment"> so we assert fail */</span></div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> assert(0);</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Data Documentation</h2>
|
||||
<a id="ab87eecc80068fc5a80e98e83536885f2" name="ab87eecc80068fc5a80e98e83536885f2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab87eecc80068fc5a80e98e83536885f2">◆ </a></span>last</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int32_t list::last</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>last link on the list </p>
|
||||
<p >Utility function to find the last element of the list.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the last element of the list </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following files:<ul>
|
||||
<li>data_structures/<a class="el" href="../../da/dc3/linked__list_8cpp.html">linked_list.cpp</a></li>
|
||||
<li>data_structures/<a class="el" href="../../d6/d05/reverse__a__linked__list_8cpp.html">reverse_a_linked_list.cpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
var classdata__structures_1_1linked__list_1_1list =
|
||||
[
|
||||
[ "list", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a50e209b55b83622254177050945e7826", null ],
|
||||
[ "list", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a50e209b55b83622254177050945e7826", null ],
|
||||
[ "display", "d1/def/classdata__structures_1_1linked__list_1_1list.html#abf7c97616b873ffeebdd0eac2d19d13e", null ],
|
||||
[ "erase", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a1fb1792ab867dc26639eef368a56989e", null ],
|
||||
[ "insert", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f", null ],
|
||||
[ "isEmpty", "d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a", null ],
|
||||
[ "push_back", "d1/def/classdata__structures_1_1linked__list_1_1list.html#ad585670a392c7e842c992d088093dff5", null ],
|
||||
[ "push_front", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a9c73f393e984f93f33852334d1a04be0", null ],
|
||||
[ "reverseList", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70", null ],
|
||||
[ "search", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a098be172c737f236763afdb8cada4835", null ],
|
||||
[ "top", "d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d", null ],
|
||||
[ "traverse", "d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe", null ],
|
||||
[ "first", "d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1", null ],
|
||||
[ "last", "d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3", null ]
|
||||
[ "last", "d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2", null ]
|
||||
];
|
||||
@@ -1,4 +1,4 @@
|
||||
<map id="data_structures::linked_list::list::search" name="data_structures::linked_list::list::search">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,161,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="209,5,365,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="209,5,365,47"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
c85fd56560fb17a64256a19f46635dba
|
||||
fef7e79711f38f3d356d55c431b7bcf1
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<g id="a_node2"><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="153,-0.5 153,-30.5 270,-30.5 270,-0.5 153,-0.5"/>
|
||||
<text text-anchor="start" x="161" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="211.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1,5 +1,5 @@
|
||||
<map id="data_structures::linked_list::list::erase" name="data_structures::linked_list::list::erase">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,35,161,76"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="209,5,365,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="209,5,365,47"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/memory/shared_ptr/reset.html#" title=" " alt="" coords="213,71,361,98"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
d5b211845dc8397edd46e92c065d0528
|
||||
6bbad93b746226f9bf47cb892112d4d4
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<g id="a_node2"><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="153,-39 153,-69 270,-69 270,-39 153,-39"/>
|
||||
<text text-anchor="start" x="161" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="211.5" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,5 @@
|
||||
<map id="data_structures::linked_list::list::insert" name="data_structures::linked_list::list::insert">
|
||||
<area shape="rect" id="node1" title="Utility function that adds a new element at the end of the list." alt="" coords="5,35,161,76"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="209,5,365,47"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/error/exception/what.html#" title=" " alt="" coords="217,71,357,98"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
c4699b4c25b7923ee8eed04ef4ebf1dd
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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: data_structures::linked_list::list::insert Pages: 1 -->
|
||||
<svg width="278pt" height="78pt"
|
||||
viewBox="0.00 0.00 278.00 77.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 73.5)">
|
||||
<title>data_structures::linked_list::list::insert</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-73.5 274,-73.5 274,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Utility function that adds a new element at the end of the list.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-17 0,-47 117,-47 117,-17 0,-17"/>
|
||||
<text text-anchor="start" x="8" y="-35" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58.5" y="-24" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::insert</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="153,-39 153,-69 270,-69 270,-39 153,-39"/>
|
||||
<text text-anchor="start" x="161" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="211.5" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M117.02,-40.38C125.46,-41.61 134.23,-42.89 142.86,-44.14"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="142.49,-47.63 152.89,-45.61 143.5,-40.7 142.49,-47.63"/>
|
||||
</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/error/exception/what.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="159,-0.5 159,-19.5 264,-19.5 264,-0.5 159,-0.5"/>
|
||||
<text text-anchor="middle" x="211.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::bad_alloc::what</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M117.02,-23.62C127.38,-22.11 138.21,-20.53 148.69,-19.01"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="149.2,-22.47 158.59,-17.56 148.19,-15.54 149.2,-22.47"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="data_structures::linked_list::list::push_front" name="data_structures::linked_list::list::push_front">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,161,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="209,5,365,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="209,5,365,47"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
a2e6d5a23721969c3b07fe0962d6dd1f
|
||||
22ac36b7236513b9f8d38ec0e2af7e34
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<g id="a_node2"><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="153,-0.5 153,-30.5 270,-30.5 270,-0.5 153,-0.5"/>
|
||||
<text text-anchor="start" x="161" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="211.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,5 @@
|
||||
<map id="data_structures::linked_list::list::top" name="data_structures::linked_list::list::top">
|
||||
<area shape="rect" id="node1" title="Utility function to find the top element of the list." alt="" coords="5,35,161,76"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="209,5,365,47"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/error/exception/what.html#" title=" " alt="" coords="217,71,357,98"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
99819564c3f1df64f69186810114c1fa
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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: data_structures::linked_list::list::top Pages: 1 -->
|
||||
<svg width="278pt" height="78pt"
|
||||
viewBox="0.00 0.00 278.00 77.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 73.5)">
|
||||
<title>data_structures::linked_list::list::top</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-73.5 274,-73.5 274,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Utility function to find the top element of the list.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-17 0,-47 117,-47 117,-17 0,-17"/>
|
||||
<text text-anchor="start" x="8" y="-35" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58.5" y="-24" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="153,-39 153,-69 270,-69 270,-39 153,-39"/>
|
||||
<text text-anchor="start" x="161" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="211.5" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M117.02,-40.38C125.46,-41.61 134.23,-42.89 142.86,-44.14"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="142.49,-47.63 152.89,-45.61 143.5,-40.7 142.49,-47.63"/>
|
||||
</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/error/exception/what.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="159,-0.5 159,-19.5 264,-19.5 264,-0.5 159,-0.5"/>
|
||||
<text text-anchor="middle" x="211.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::exception::what</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M117.02,-23.62C127.38,-22.11 138.21,-20.53 148.69,-19.01"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="149.2,-22.47 158.59,-17.56 148.19,-15.54 149.2,-22.47"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="data_structures::linked_list::list::display" name="data_structures::linked_list::list::display">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,161,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="209,5,365,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="209,5,365,47"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
4f1fb5e679ae25a1b63844194c139096
|
||||
79fb587174a84c2dce8ea524dacc5d20
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<g id="a_node2"><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="153,-0.5 153,-30.5 270,-30.5 270,-0.5 153,-0.5"/>
|
||||
<text text-anchor="start" x="161" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="211.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="data_structures::linked_list::list::push_back" name="data_structures::linked_list::list::push_back">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,161,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="209,5,365,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="209,5,365,47"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
f5abf2240e8d04e5e4061dc2e211b0c0
|
||||
3fbc8296c8bb734e2c0a23deb426a7ed
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<g id="a_node2"><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="153,-0.5 153,-30.5 270,-30.5 270,-0.5 153,-0.5"/>
|
||||
<text text-anchor="start" x="161" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="211.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -151,7 +151,7 @@ Functions</h2></td></tr>
|
||||
<p >two elements a[i] and a[j] form an inversion if <code>a[i]</code> > <code>a[j]</code> and i < j</p>
|
||||
<p >Time Complexity --> <code>O(n.log n)</code></p>
|
||||
<p >Space Complexity --> <code>O(n)</code> ; additional array <code>temp[1..n]</code> </p>
|
||||
<h3><a class="anchor" id="autotoc_md97"></a>
|
||||
<h3><a class="anchor" id="autotoc_md98"></a>
|
||||
Algorithm</h3>
|
||||
<ol type="1">
|
||||
<li>The idea is similar to merge sort, divide the array into two equal or almost equal halves in each step until the base case is reached.</li>
|
||||
|
||||
@@ -150,7 +150,7 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >An implementation of <a href="https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)" target="_blank">LRU Cache</a>. Lru is a part of cache algorithms (also frequently called cache replacement algorithms or cache replacement policies). </p>
|
||||
<h3><a class="anchor" id="autotoc_md86"></a>
|
||||
<h3><a class="anchor" id="autotoc_md87"></a>
|
||||
Logic</h3>
|
||||
<ul>
|
||||
<li>Discards the least recently used items first.</li>
|
||||
@@ -158,7 +158,7 @@ Logic</h3>
|
||||
<li>General implementations of this technique require keeping "age bits" for cache-lines and track the "Least Recently Used" cache-line based on age-bits.</li>
|
||||
<li>In such an implementation, every time a cache-line is used, the age of all other cache-lines changes</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" id="autotoc_md87"></a>
|
||||
<h3><a class="anchor" id="autotoc_md88"></a>
|
||||
Algorithm explanation</h3>
|
||||
<p >For a cache of page frame x:</p><ul>
|
||||
<li>Check if the page is present in cache.</li>
|
||||
@@ -170,7 +170,7 @@ Algorithm explanation</h3>
|
||||
</li>
|
||||
</ul>
|
||||
<p >Every time a requested page is not found in cache, that is a miss or page fault, and if the page is present in cache, then its a hit.</p>
|
||||
<h2><a class="anchor" id="autotoc_md88"></a>
|
||||
<h2><a class="anchor" id="autotoc_md89"></a>
|
||||
Data Structure used</h2>
|
||||
<ul>
|
||||
<li>In the algorithm below we used two different data structure, one is linked list and other one is a hash map</li>
|
||||
|
||||
@@ -135,7 +135,7 @@ Functions</h2></td></tr>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://adityaprakash.tech" target="_blank">Aditya Prakash</a></dd></dl>
|
||||
<p>The working principle of the Bubble sort algorithm.</p>
|
||||
<p >Bubble sort is a simple sorting algorithm used to rearrange a set of ascending or descending order elements. Bubble sort gets its name from the fact that data "bubbles" to the top of the dataset.</p>
|
||||
<h3><a class="anchor" id="autotoc_md98"></a>
|
||||
<h3><a class="anchor" id="autotoc_md99"></a>
|
||||
Algorithm</h3>
|
||||
<p >What is Swap?</p>
|
||||
<p >Swapping two numbers means that we interchange their values. Often, an additional variable is required for this operation. This is further illustrated in the following:</p>
|
||||
|
||||
131
d4/d0e/classdata__structures_1_1linked__list_1_1_node.html
Normal file
@@ -0,0 +1,131 @@
|
||||
<!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::linked_list::Node Class 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"> 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&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&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&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('d4/d0e/classdata__structures_1_1linked__list_1_1_node.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="#pub-attribs">Public Attributes</a> |
|
||||
<a href="../../d7/d5e/classdata__structures_1_1linked__list_1_1_node-members.html">List of all members</a> </div>
|
||||
<div class="headertitle"><div class="title">data_structures::linked_list::Node Class Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for data_structures::linked_list::Node:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d0/d30/classdata__structures_1_1linked__list_1_1_node__coll__graph.svg" width="220" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
|
||||
Public Attributes</h2></td></tr>
|
||||
<tr class="memitem:a6ff2c183de573154c41eb54a9bb2d131"><td class="memItemLeft" align="right" valign="top"><a id="a6ff2c183de573154c41eb54a9bb2d131" name="a6ff2c183de573154c41eb54a9bb2d131"></a>
|
||||
int32_t </td><td class="memItemRight" valign="bottom"><b>val</b></td></tr>
|
||||
<tr class="separator:a6ff2c183de573154c41eb54a9bb2d131"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acfccd7b52c91d91300c5b317e5ec7a6e"><td class="memItemLeft" align="right" valign="top"><a id="acfccd7b52c91d91300c5b317e5ec7a6e" name="acfccd7b52c91d91300c5b317e5ec7a6e"></a>
|
||||
<a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">Node</a> * </td><td class="memItemRight" valign="bottom"><b>next</b></td></tr>
|
||||
<tr class="memdesc:acfccd7b52c91d91300c5b317e5ec7a6e"><td class="mdescLeft"> </td><td class="mdescRight">value of the current link <br /></td></tr>
|
||||
<tr class="separator:acfccd7b52c91d91300c5b317e5ec7a6e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >A <a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">Node</a> class containing a value and pointer to another link </p>
|
||||
</div><hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>data_structures/<a class="el" href="../../d6/d05/reverse__a__linked__list_8cpp.html">reverse_a_linked_list.cpp</a></li>
|
||||
</ul>
|
||||
</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="../../d5/d3c/namespacedata__structures.html">data_structures</a></li><li class="navelem"><b>linked_list</b></li><li class="navelem"><a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">Node</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>
|
||||
4
d4/d0e/classdata__structures_1_1linked__list_1_1_node.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var classdata__structures_1_1linked__list_1_1_node =
|
||||
[
|
||||
[ "next", "d4/d0e/classdata__structures_1_1linked__list_1_1_node.html#acfccd7b52c91d91300c5b317e5ec7a6e", null ]
|
||||
];
|
||||
@@ -163,21 +163,21 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >An implementation for finding the <a href="https://www.youtube.com/watch?v=5cPbNCrdotA" target="_blank">Inorder successor of a binary search tree</a> Inorder successor of a node is the next node in Inorder traversal of the Binary Tree. Inorder Successor is NULL for the last node in Inorder traversal. </p>
|
||||
<h3><a class="anchor" id="autotoc_md79"></a>
|
||||
<h3><a class="anchor" id="autotoc_md80"></a>
|
||||
Case 1: The given node has the right node/subtree</h3>
|
||||
<pre class="fragment"> * In this case, the left-most deepest node in the right subtree will
|
||||
</pre><p> come just after the given node as we go to left deep in inorder.</p><ul>
|
||||
<li>Go deep to left most node in right subtree. OR, we can also say in case if BST, find the minimum of the subtree for a given node.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" id="autotoc_md80"></a>
|
||||
<h3><a class="anchor" id="autotoc_md81"></a>
|
||||
Case 2: The given node does not have a right node/subtree</h3>
|
||||
<h4><a class="anchor" id="autotoc_md81"></a>
|
||||
<h4><a class="anchor" id="autotoc_md82"></a>
|
||||
Method 1: Use parent pointer (store the address of parent nodes)</h4>
|
||||
<ul>
|
||||
<li>If a node does not have the right subtree, and we already visited the node itself, then the next node will be its parent node according to inorder traversal, and if we are going to parent from left, then the parent would be unvisited.</li>
|
||||
<li>In other words, go to the nearest ancestor for which given node would be in left subtree.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" id="autotoc_md82"></a>
|
||||
<h4><a class="anchor" id="autotoc_md83"></a>
|
||||
Method 2: Search from the root node</h4>
|
||||
<ul>
|
||||
<li>In case if there is no link from a child node to the parent node, we need to walk down the tree starting from the root node to the given node, by doing so, we are visiting every ancestor of the given node.</li>
|
||||
|
||||
@@ -125,7 +125,7 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation to check whether a number is a power of 2 or not. </p>
|
||||
<p >This algorithm uses bit manipulation to check if a number is a power of 2 or not.</p>
|
||||
<h3><a class="anchor" id="autotoc_md77"></a>
|
||||
<h3><a class="anchor" id="autotoc_md78"></a>
|
||||
Algorithm</h3>
|
||||
<p >Let the input number be n, then the bitwise and between n and n-1 will let us know whether the number is power of 2 or not</p>
|
||||
<p >For Example, If N= 32 then N-1 is 31, if we perform bitwise and of these two numbers then the result will be zero, which indicates that it is the power of 2 If N=23 then N-1 is 22, if we perform bitwise and of these two numbers then the result will not be zero , which indicates that it is not the power of 2 </p><dl class="section note"><dt>Note</dt><dd>This implementation is better than naive recursive or iterative approach.</dd></dl>
|
||||
|
||||
@@ -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 <a href="https://en.wikipedia.org/wiki/Gift_wrapping_algorithm" target="_blank">Jarvis’s</a> algorithm. </p>
|
||||
<p >Given a set of points in the plane. the convex hull of the set is the smallest convex polygon that contains all the points of it.</p>
|
||||
<h3><a class="anchor" id="autotoc_md65"></a>
|
||||
<h3><a class="anchor" id="autotoc_md66"></a>
|
||||
Algorithm</h3>
|
||||
<p >The idea of Jarvis’s Algorithm is simple, we start from the leftmost point (or point with minimum x coordinate value) and we keep wrapping points in counterclockwise direction.</p>
|
||||
<p >The idea is to use orientation() here. Next point is selected as the point that beats all other points at counterclockwise orientation, i.e., next point is q if for any other point r, we have “orientation(p, q, r) = counterclockwise”.</p>
|
||||
|
||||
@@ -139,7 +139,7 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of the <a href="https://en.wikipedia.org/wiki/Selection_sort" target="_blank">Selection sort</a> implementation using recursion. </p>
|
||||
<p >The selection sort algorithm divides the input list into two parts: a sorted sublist of items which is built up from left to right at the front (left) of the list, and a sublist of the remaining unsorted items that occupy the rest of the list. Initially, the sorted sublist is empty, and the unsorted sublist is the entire input list. The algorithm proceeds by finding the smallest (or largest, depending on the sorting order) element in the unsorted sublist, exchanging (swapping) it with the leftmost unsorted element (putting it in sorted order), and moving the sublist boundaries one element to the right.</p>
|
||||
<h3><a class="anchor" id="autotoc_md99"></a>
|
||||
<h3><a class="anchor" id="autotoc_md100"></a>
|
||||
Implementation</h3>
|
||||
<p >FindMinIndex This function finds the minimum element of the array(list) recursively by simply comparing the minimum element of array reduced size by 1 and compares it to the last element of the array to find the minimum of the whole array.</p>
|
||||
<p >SelectionSortRecursive Just like selection sort, it divides the list into two parts (i.e.: sorted and unsorted) and finds the minimum of the unsorted array. By calling the <code>FindMinIndex</code> function, it swaps the minimum element with the first element of the list, and then solves recursively for the remaining unsorted list. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Tushar-K24" target="_blank">Tushar Khanduri</a> </dd></dl>
|
||||
|
||||
@@ -139,7 +139,7 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process" target="_blank">Gram Schmidt Orthogonalisation Process</a> </p>
|
||||
<p >Takes the input of Linearly Independent Vectors, returns vectors orthogonal to each other.</p>
|
||||
<h3><a class="anchor" id="autotoc_md75"></a>
|
||||
<h3><a class="anchor" id="autotoc_md76"></a>
|
||||
Algorithm</h3>
|
||||
<p >Take the first vector of given LI vectors as first vector of Orthogonal vectors. Take projection of second input vector on the first vector of Orthogonal vector and subtract it from the 2nd LI vector. Take projection of third vector on the second vector of Othogonal vectors and subtract it from the 3rd LI vector. Keep repeating the above process until all the vectors in the given input array are exhausted.</p>
|
||||
<p >For Example: In R2, Input LI Vectors={(3,1),(2,2)} then Orthogonal Vectors= {(3, 1),(-0.4, 1.2)}</p>
|
||||
|
||||
@@ -127,10 +127,13 @@ constexpr float </td><td class="memItemRight" valign="bottom"><b>PROBABILIT
|
||||
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a></p>
|
||||
<p >for IO operations</p>
|
||||
<p >Data-structure algorithms.</p>
|
||||
<p >for managing dynamic storage</p>
|
||||
<p >Algorithms with data structures.</p>
|
||||
<p >for assert</p>
|
||||
<p >for io operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></p>
|
||||
<p >Algorithms with data structures</p>
|
||||
<p >for assert for I/O operations for dynamic memory</p>
|
||||
<p >Data Structures algorithms</p>
|
||||
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a> for assert</p>
|
||||
<p >Data Structures algorithms</p>
|
||||
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a> for assert for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ofstream.html">std::ofstream</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></p>
|
||||
|
||||
1
d5/d3c/namespacedata__structures.js
vendored
@@ -3,6 +3,7 @@ var namespacedata__structures =
|
||||
[ "linked_list", null, [
|
||||
[ "link", "de/d9d/classdata__structures_1_1linked__list_1_1link.html", "de/d9d/classdata__structures_1_1linked__list_1_1link" ],
|
||||
[ "list", "d1/def/classdata__structures_1_1linked__list_1_1list.html", "d1/def/classdata__structures_1_1linked__list_1_1list" ],
|
||||
[ "Node", "d4/d0e/classdata__structures_1_1linked__list_1_1_node.html", "d4/d0e/classdata__structures_1_1linked__list_1_1_node" ],
|
||||
[ "isDigit", "da/dc3/linked__list_8cpp.html#ab1a372fe1e605bc0e0987dcdd7361180", null ]
|
||||
] ],
|
||||
[ "list_array", null, [
|
||||
|
||||
@@ -148,14 +148,14 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list" target="_blank">Sublist Search Algorithm</a> </p>
|
||||
<h3><a class="anchor" id="autotoc_md94"></a>
|
||||
<h3><a class="anchor" id="autotoc_md95"></a>
|
||||
Algorithm</h3>
|
||||
<ul>
|
||||
<li>Sublist search is used to detect a presence of one list in another list.</li>
|
||||
<li>Suppose we have a single-node list (let's say the first list), and we want to ensure that the list is present in another list (let's say the second list), then we can perform the sublist search to find it.</li>
|
||||
<li>For instance, the first list contains these elements: 23 -> 30 -> 41, and the second list contains these elements: 10 -> 15 -> 23 -> 30 -> 41 -> 49. At a glance, we see that the first list presents in the second list.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" id="autotoc_md95"></a>
|
||||
<h3><a class="anchor" id="autotoc_md96"></a>
|
||||
Working</h3>
|
||||
<ul>
|
||||
<li>The sublist search algorithm works by comparing the first element of the first list with the first element of the second list.</li>
|
||||
|
||||
@@ -107,14 +107,14 @@ $(document).ready(function(){initNavTree('d5/d88/md__d_i_r_e_c_t_o_r_y.html','..
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/sudoku_solve.cpp" target="_blank">Sudoku Solve</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/wildcard_matching.cpp" target="_blank">Wildcard Matching</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md37"></a>
|
||||
<h1><a class="anchor" id="autotoc_md38"></a>
|
||||
Bit Manipulation</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/count_of_set_bits.cpp" target="_blank">Count Of Set Bits</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp" target="_blank">Count Of Trailing Ciphers In Factorial N</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/hamming_distance.cpp" target="_blank">Hamming Distance</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md38"></a>
|
||||
<h1><a class="anchor" id="autotoc_md39"></a>
|
||||
Ciphers</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/base64_encoding.cpp" target="_blank">Base64 Encoding</a></li>
|
||||
@@ -127,7 +127,7 @@ Ciphers</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/vigenere_cipher.cpp" target="_blank">Vigenere Cipher</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/xor_cipher.cpp" target="_blank">Xor Cipher</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md39"></a>
|
||||
<h1><a class="anchor" id="autotoc_md40"></a>
|
||||
Data Structures</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/avltree.cpp" target="_blank">Avltree</a></li>
|
||||
@@ -154,6 +154,7 @@ Data Structures</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_linkedlist.cpp" target="_blank">Queue Using Linkedlist</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_two_stacks.cpp" target="_blank">Queue Using Two Stacks</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/rb_tree.cpp" target="_blank">Rb Tree</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/reverse_a_linked_list.cpp" target="_blank">Reverse A Linked List</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/skip_list.cpp" target="_blank">Skip List</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/sparse_table.cpp" target="_blank">Sparse Table</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/stack.h" target="_blank">Stack</a></li>
|
||||
@@ -168,12 +169,12 @@ Data Structures</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_tree.cpp" target="_blank">Trie Tree</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_using_hashmap.cpp" target="_blank">Trie Using Hashmap</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md40"></a>
|
||||
<h1><a class="anchor" id="autotoc_md41"></a>
|
||||
Divide And Conquer</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp" target="_blank">Karatsuba Algorithm For Fast Multiplication</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md41"></a>
|
||||
<h1><a class="anchor" id="autotoc_md42"></a>
|
||||
Dynamic Programming</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/0_1_knapsack.cpp" target="_blank">0 1 Knapsack</a></li>
|
||||
@@ -204,13 +205,13 @@ Dynamic Programming</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/tree_height.cpp" target="_blank">Tree Height</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/word_break.cpp" target="_blank">Word Break</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md42"></a>
|
||||
<h1><a class="anchor" id="autotoc_md43"></a>
|
||||
Geometry</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/geometry/jarvis_algorithm.cpp" target="_blank">Jarvis Algorithm</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/geometry/line_segment_intersection.cpp" target="_blank">Line Segment Intersection</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md43"></a>
|
||||
<h1><a class="anchor" id="autotoc_md44"></a>
|
||||
Graph</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/bidirectional_dijkstra.cpp" target="_blank">Bidirectional Dijkstra</a></li>
|
||||
@@ -234,12 +235,12 @@ Graph</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/topological_sort_by_kahns_algo.cpp" target="_blank">Topological Sort By Kahns Algo</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/travelling_salesman_problem.cpp" target="_blank">Travelling Salesman Problem</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md44"></a>
|
||||
<h1><a class="anchor" id="autotoc_md45"></a>
|
||||
Graphics</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graphics/spirograph.cpp" target="_blank">Spirograph</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md45"></a>
|
||||
<h1><a class="anchor" id="autotoc_md46"></a>
|
||||
Greedy Algorithms</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/dijkstra.cpp" target="_blank">Dijkstra</a></li>
|
||||
@@ -249,7 +250,7 @@ Greedy Algorithms</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/kruskals_minimum_spanning_tree.cpp" target="_blank">Kruskals Minimum Spanning Tree</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/prims_minimum_spanning_tree.cpp" target="_blank">Prims Minimum Spanning Tree</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md46"></a>
|
||||
<h1><a class="anchor" id="autotoc_md47"></a>
|
||||
Hashing</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/chaining.cpp" target="_blank">Chaining</a></li>
|
||||
@@ -259,12 +260,12 @@ Hashing</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/quadratic_probing_hash_table.cpp" target="_blank">Quadratic Probing Hash Table</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/sha1.cpp" target="_blank">Sha1</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md47"></a>
|
||||
<h1><a class="anchor" id="autotoc_md48"></a>
|
||||
Linear Algebra</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/linear_algebra/gram_schmidt.cpp" target="_blank">Gram Schmidt</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md48"></a>
|
||||
<h1><a class="anchor" id="autotoc_md49"></a>
|
||||
Machine Learning</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/a_star_search.cpp" target="_blank">A Star Search</a></li>
|
||||
@@ -275,7 +276,7 @@ Machine Learning</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/ordinary_least_squares_regressor.cpp" target="_blank">Ordinary Least Squares Regressor</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/vector_ops.hpp" target="_blank">Vector Ops</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md49"></a>
|
||||
<h1><a class="anchor" id="autotoc_md50"></a>
|
||||
Math</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/armstrong_number.cpp" target="_blank">Armstrong Number</a></li>
|
||||
@@ -329,7 +330,7 @@ Math</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sum_of_digits.cpp" target="_blank">Sum Of Digits</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/vector_cross_product.cpp" target="_blank">Vector Cross Product</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md50"></a>
|
||||
<h1><a class="anchor" id="autotoc_md51"></a>
|
||||
Numerical Methods</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/bisection_method.cpp" target="_blank">Bisection Method</a></li>
|
||||
@@ -350,7 +351,7 @@ Numerical Methods</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/rungekutta.cpp" target="_blank">Rungekutta</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/successive_approximation.cpp" target="_blank">Successive Approximation</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md51"></a>
|
||||
<h1><a class="anchor" id="autotoc_md52"></a>
|
||||
Operations On Datastructures</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/array_left_rotation.cpp" target="_blank">Array Left Rotation</a></li>
|
||||
@@ -365,7 +366,7 @@ Operations On Datastructures</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/trie_multiple_search.cpp" target="_blank">Trie Multiple Search</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/union_of_2_arrays.cpp" target="_blank">Union Of 2 Arrays</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md52"></a>
|
||||
<h1><a class="anchor" id="autotoc_md53"></a>
|
||||
Others</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/buzz_number.cpp" target="_blank">Buzz Number</a></li>
|
||||
@@ -389,7 +390,7 @@ Others</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/tower_of_hanoi.cpp" target="_blank">Tower Of Hanoi</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/vector_important_functions.cpp" target="_blank">Vector Important Functions</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md53"></a>
|
||||
<h1><a class="anchor" id="autotoc_md54"></a>
|
||||
Probability</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/addition_rule.cpp" target="_blank">Addition Rule</a></li>
|
||||
@@ -397,7 +398,7 @@ Probability</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/binomial_dist.cpp" target="_blank">Binomial Dist</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/poisson_dist.cpp" target="_blank">Poisson Dist</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md54"></a>
|
||||
<h1><a class="anchor" id="autotoc_md55"></a>
|
||||
Range Queries</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/fenwick_tree.cpp" target="_blank">Fenwick Tree</a></li>
|
||||
@@ -407,7 +408,7 @@ Range Queries</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/segtree.cpp" target="_blank">Segtree</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/sparse_table.cpp" target="_blank">Sparse Table</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md55"></a>
|
||||
<h1><a class="anchor" id="autotoc_md56"></a>
|
||||
Search</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/binary_search.cpp" target="_blank">Binary Search</a></li>
|
||||
@@ -425,7 +426,7 @@ Search</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/ternary_search.cpp" target="_blank">Ternary Search</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/text_search.cpp" target="_blank">Text Search</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md56"></a>
|
||||
<h1><a class="anchor" id="autotoc_md57"></a>
|
||||
Sorting</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bead_sort.cpp" target="_blank">Bead Sort</a></li>
|
||||
@@ -468,7 +469,7 @@ Sorting</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/wave_sort.cpp" target="_blank">Wave Sort</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/wiggle_sort.cpp" target="_blank">Wiggle Sort</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md57"></a>
|
||||
<h1><a class="anchor" id="autotoc_md58"></a>
|
||||
Strings</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/brute_force_string_searching.cpp" target="_blank">Brute Force String Searching</a></li>
|
||||
|
||||
@@ -164,7 +164,7 @@ Functions</h2></td></tr>
|
||||
<li>Store salted password</li>
|
||||
</ol>
|
||||
<p >However <a class="el" href="../../dd/d43/namespace_m_d5.html" title="Functions for the MD5 algorithm implementation.">MD5</a> has be know to be cryptographically weak for quite some time, yet it is still widely used. This weakness was exploited by the <a href="https://en.wikipedia.org/wiki/Flame_(malware)" target="_blank">Flame Malware</a> in 2012</p>
|
||||
<h3><a class="anchor" id="autotoc_md73"></a>
|
||||
<h3><a class="anchor" id="autotoc_md74"></a>
|
||||
Algorithm</h3>
|
||||
<p >First of all, all values are expected to be in <a href="https://en.wikipedia.org/wiki/Endianness" target="_blank">little endian</a>. This is especially important when using part of the bytestring as an integer.</p>
|
||||
<p >The first step of the algorithm is to pad the message for its length to be a multiple of 64 (bytes). This is done by first adding 0x80 (10000000) and then only zeroes until the last 8 bytes must be filled, where then the 64 bit size of the input will be added</p>
|
||||
|
||||
@@ -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 <a href="https://en.wikipedia.org/wiki/Bogosort" target="_blank">Bogosort algorithm</a> </p>
|
||||
<p >In computer science, bogosort (also known as permutation sort, stupid sort, slowsort, shotgun sort, random sort, monkey sort, bobosort or shuffle sort) is a highly inefficient sorting algorithm based on the generate and test paradigm. Two versions of this algorithm exist: a deterministic version that enumerates all permutations until it hits a sorted one, and a randomized version that randomly permutes its input.Randomized version is implemented here.</p>
|
||||
<h3><a class="anchor" id="autotoc_md96"></a>
|
||||
<h3><a class="anchor" id="autotoc_md97"></a>
|
||||
Algorithm</h3>
|
||||
<p >Shuffle the array untill array is sorted.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/imdeep2905" target="_blank">Deep Raval</a> </dd></dl>
|
||||
|
||||
255
d6/d05/reverse__a__linked__list_8cpp.html
Normal 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"> 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&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&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&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> |
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<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 <cassert></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <memory></code><br />
|
||||
<code>#include <new></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  </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"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </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"> </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  </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"> </td><td class="mdescRight">Data Structures algorithms. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:d3/db0/namespacelinked__list"><td class="memItemLeft" align="right" valign="top">namespace  </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"> </td><td class="mdescRight">Functions for singly linked list algorithm. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </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 </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"> </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"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </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"> </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"> </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">◆ </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 </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">◆ </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> << <span class="stringliteral">"All tests have successfully passed!"</span> << <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< link > 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>
|
||||
7
d6/d05/reverse__a__linked__list_8cpp.js
Normal 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 ]
|
||||
];
|
||||
@@ -0,0 +1,10 @@
|
||||
<map id="test" name="test">
|
||||
<area shape="rect" id="node1" title="Self-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>
|
||||
@@ -0,0 +1 @@
|
||||
f1e114e15585fa05c3aba62652f450ee
|
||||
@@ -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-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->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->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->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->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->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node1->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->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node1->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->Node8 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node1->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->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->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->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node3->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->Node4 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node7->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->Node5 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node7->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 |
@@ -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-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>
|
||||
@@ -0,0 +1 @@
|
||||
0e3cda2cc47e596fb649684c4d05a331
|
||||
@@ -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-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->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->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->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->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->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node2->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->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node2->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->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node2->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->Node9 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node2->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->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->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->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->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->Node5 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node8->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->Node6 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node8->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 |
@@ -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<=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>
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
<!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++: Member List</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"> 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&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&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&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('d4/d0e/classdata__structures_1_1linked__list_1_1_node.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="headertitle"><div class="title">data_structures::linked_list::Node Member List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">data_structures::linked_list::Node</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html#acfccd7b52c91d91300c5b317e5ec7a6e">next</a></td><td class="entry"><a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">data_structures::linked_list::Node</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>val</b> (defined in <a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">data_structures::linked_list::Node</a>)</td><td class="entry"><a class="el" href="../../d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">data_structures::linked_list::Node</a></td><td class="entry"></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<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>
|
||||
@@ -140,7 +140,7 @@ Functions</h2></td></tr>
|
||||
<li>Capitalize zero or more of <code>a</code>'s lowercase letters.</li>
|
||||
<li>Delete all of the remaining lowercase letters in <code>a</code>.</li>
|
||||
</ol>
|
||||
<h3><a class="anchor" id="autotoc_md59"></a>
|
||||
<h3><a class="anchor" id="autotoc_md60"></a>
|
||||
Algorithm</h3>
|
||||
<p >The idea is in the problem statement itself: iterate through characters of string <code>a</code> and <code>b</code> (for character indexes <code>i</code> and <code>j</code> respectively):</p><ol type="1">
|
||||
<li>If <code>a[i]</code> and <code>b[j]</code> are equal, then move to next position</li>
|
||||
|
||||
@@ -150,7 +150,7 @@ Functions</h2></td></tr>
|
||||
<div class="textblock"><p >Simple C++ implementation of the <a href="https://en.wikipedia.org/wiki/SHA-1" target="_blank">SHA-1 Hashing Algorithm</a> </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/tGautot" target="_blank">tGautot</a></dd></dl>
|
||||
<p><a href="https://en.wikipedia.org/wiki/SHA-1" target="_blank">SHA-1</a> is a cryptographic hash function that was developped by the <a href="https://en.wikipedia.org/wiki/National_Security_Agency" target="_blank">NSA</a> 1995. SHA-1 is not considered secure since around 2010.</p>
|
||||
<h3><a class="anchor" id="autotoc_md74"></a>
|
||||
<h3><a class="anchor" id="autotoc_md75"></a>
|
||||
Algorithm</h3>
|
||||
<p >The first step of the algorithm is to pad the message for its length to be a multiple of 64 (bytes). This is done by first adding 0x80 (10000000) and then only zeroes until the last 8 bytes must be filled, where then the 64 bit size of the input will be added</p>
|
||||
<p >Once this is done, the algo breaks down this padded message into 64 bytes chunks. Each chunk is used for one <em>round</em>, a round breaks the chunk into 16 blocks of 4 bytes. These 16 blocks are then extended to 80 blocks using <a class="el" href="../../d7/d47/namespace_x_o_r.html" title="Functions for XOR cipher algorithm.">XOR</a> operations on existing blocks (see code for more details). The algorithm will then update its 160-bit state (here represented used 5 32-bits integer) using partial hashes computed using special functions on the blocks previously built. Please take a look at the <a href="https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode" target="_blank">wikipedia article</a> for more precision on these operations </p><dl class="section note"><dt>Note</dt><dd>This is a simple implementation for a byte string but some implmenetations can work on bytestream, messages of unknown length. </dd></dl>
|
||||
|
||||
@@ -157,13 +157,13 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Iterative version of Preorder, Postorder, and preorder <a href="https://en.wikipedia.org/wiki/Tree_traversal" target="_blank">Traversal of the Tree</a> </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/motasimmakki" target="_blank">Motasim</a></dd></dl>
|
||||
<h3><a class="anchor" id="autotoc_md83"></a>
|
||||
<h3><a class="anchor" id="autotoc_md84"></a>
|
||||
Iterative Preorder Traversal of a tree</h3>
|
||||
<p >Create a Stack that will store the <a class="el" href="../../db/d8b/struct_node.html">Node</a> of Tree. Push the root node into the stack. Save the root into the variabe named as current, and pop and elemnt from the stack. Store the data of current into the result array, and start traversing from it. Push both the child node of the current node into the stack, first right child then left child. Repeat the same set of steps untill the Stack becomes empty. And return the result array as the preorder traversal of a tree.</p>
|
||||
<h3><a class="anchor" id="autotoc_md84"></a>
|
||||
<h3><a class="anchor" id="autotoc_md85"></a>
|
||||
Iterative Postorder Traversal of a tree</h3>
|
||||
<p >Create a Stack that will store the <a class="el" href="../../db/d8b/struct_node.html">Node</a> of Tree. Push the root node into the stack. Save the root into the variabe named as current, and pop and elemnt from the stack. Store the data of current into the result array, and start traversing from it. Push both the child node of the current node into the stack, first left child then right child. Repeat the same set of steps untill the Stack becomes empty. Now reverse the result array and then return it to the calling function as a postorder traversal of a tree.</p>
|
||||
<h3><a class="anchor" id="autotoc_md85"></a>
|
||||
<h3><a class="anchor" id="autotoc_md86"></a>
|
||||
Iterative Inorder Traversal of a tree</h3>
|
||||
<p >Create a Stack that will store the <a class="el" href="../../db/d8b/struct_node.html">Node</a> of Tree. Push the root node into the stack. Save the root into the variabe named as current. Now iterate and take the current to the extreme left of the tree by traversing only to its left. Pop the elemnt from the stack and assign it to the current. Store the data of current into the result array. Repeat the same set of steps until the Stack becomes empty or the current becomes NULL. And return the result array as the inorder traversal of a tree. </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
|
||||
@@ -155,7 +155,7 @@ uint32_t </td><td class="memItemRight" valign="bottom"><b>graph::disjoint_u
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Disjoint_union" target="_blank">Disjoint union</a> </p>
|
||||
<p >The Disjoint union is the technique to find connected component in graph efficiently.</p>
|
||||
<h3><a class="anchor" id="autotoc_md66"></a>
|
||||
<h3><a class="anchor" id="autotoc_md67"></a>
|
||||
Algorithm</h3>
|
||||
<p >In <a class="el" href="../../da/d9a/class_graph.html">Graph</a>, if you have to find out the number of connected components, there are 2 options</p><ol type="1">
|
||||
<li>Depth first search</li>
|
||||
|
||||
@@ -97,15 +97,24 @@ $(document).ready(function(){initNavTree('d1/def/classdata__structures_1_1linked
|
||||
<p>This is the complete list of members for <a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#abf7c97616b873ffeebdd0eac2d19d13e">display</a>()</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a1fb1792ab867dc26639eef368a56989e">erase</a>(int old_elem)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a></td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a></td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>display</b>() (defined in <a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a>)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a1fb1792ab867dc26639eef368a56989e">erase</a>(int old_elem)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a></td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>head</b> (defined in <a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a>)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">insert</a>(int32_t new_elem)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>isEmpty</b>() (defined in <a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a>)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">last</a></td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>last</b>() (defined in <a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a>)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a50e209b55b83622254177050945e7826">list</a>()</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a50e209b55b83622254177050945e7826">list</a>()</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ad585670a392c7e842c992d088093dff5">push_back</a>(int new_elem)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a9c73f393e984f93f33852334d1a04be0">push_front</a>(int new_elem)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>reverse</b>() (defined in <a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a>)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a098be172c737f236763afdb8cada4835">search</a>(int find_elem)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70">reverseList</a>()</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a098be172c737f236763afdb8cada4835">search</a>(int find_elem)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d">top</a>()</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">traverse</a>(int32_t index)</td><td class="entry"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">data_structures::linked_list::list</a></td><td class="entry"></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
@@ -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 <a href="https://en.wikipedia.org/wiki/Edit_distance" target="_blank">Minimum Edit Distance</a> using Dynamic Programing. </p>
|
||||
<p >Given two strings str1 & str2 and we have to calculate the minimum number of operations (Insert, Remove, Replace) required to convert str1 to str2.</p>
|
||||
<h3><a class="anchor" id="autotoc_md64"></a>
|
||||
<h3><a class="anchor" id="autotoc_md65"></a>
|
||||
Algorithm</h3>
|
||||
<p >We will solve this problem using Naive recursion. But as we are approaching with a DP solution. So, we will take a DP array to store the solution of all sub-problems so that we don't have to perform recursion again and again. Now to solve the problem, We can traverse all characters from either right side of the strings or left side. Suppose we will do it from the right side. So, there are two possibilities for every pair of characters being traversed.</p><ol type="1">
|
||||
<li>If the last characters of two strings are the same, Ignore the characters and get the count for the remaining string. So, we get the solution for lengths m-1 and n-1 in a DP array.</li>
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<area shape="rect" id="node7" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ad585670a392c7e842c992d088093dff5" title=" " alt="" coords="104,123,260,164"/>
|
||||
<area shape="rect" id="node8" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#a098be172c737f236763afdb8cada4835" title=" " alt="" coords="104,188,260,229"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/stol.html#" title=" " alt="" coords="148,319,216,346"/>
|
||||
<area shape="rect" id="node3" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="308,156,464,197"/>
|
||||
<area shape="rect" id="node3" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title="Utility function that checks if the list is empty." alt="" coords="308,156,464,197"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/memory/shared_ptr/reset.html#" title=" " alt="" coords="312,261,460,287"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
5562c38dc3edb2a9bc6dbb71b5f4d23c
|
||||
6b212deec9f04ec65076ade9ca5faded
|
||||
@@ -115,7 +115,7 @@
|
||||
<!-- 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#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<g id="a_node3"><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="227,-112 227,-142 344,-142 344,-112 227,-112"/>
|
||||
<text text-anchor="start" x="235" y="-130" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="285.5" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
@@ -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 <a href="https://en.wikipedia.org/wiki/Knapsack_problem" target="_blank">0-1 Knapsack Problem</a> </p>
|
||||
<p >Given weights and values of n items, put these items in a knapsack of capacity <code>W</code> to get the maximum total value in the knapsack. In other words, given two integer arrays <code>val[0..n-1]</code> and <code>wt[0..n-1]</code> which represent values and weights associated with n items respectively. Also given an integer W which represents knapsack capacity, find out the maximum value subset of <code>val[]</code> such that sum of the weights of this subset is smaller than or equal to W. You cannot break an item, either pick the complete item or don’t pick it (0-1 property)</p>
|
||||
<h3><a class="anchor" id="autotoc_md58"></a>
|
||||
<h3><a class="anchor" id="autotoc_md59"></a>
|
||||
Algorithm</h3>
|
||||
<p >The idea is to consider all subsets of items and calculate the total weight and value of all subsets. Consider the only subsets whose total weight is smaller than <code>W</code>. From all such subsets, pick the maximum value subset.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Anmol3299" target="_blank">Anmol</a> </dd>
|
||||
|
||||
7
db/da2/reverse__a__linked__list_8cpp__incl.map
Normal file
@@ -0,0 +1,7 @@
|
||||
<map id="data_structures/reverse_a_linked_list.cpp" name="data_structures/reverse_a_linked_list.cpp">
|
||||
<area shape="rect" id="node1" title="Implementation of Reversing a single linked list" alt="" coords="98,5,261,47"/>
|
||||
<area shape="rect" id="node2" title=" " alt="" coords="5,95,71,121"/>
|
||||
<area shape="rect" id="node3" title=" " alt="" coords="95,95,168,121"/>
|
||||
<area shape="rect" id="node4" title=" " alt="" coords="192,95,263,121"/>
|
||||
<area shape="rect" id="node5" title=" " alt="" coords="287,95,333,121"/>
|
||||
</map>
|
||||
1
db/da2/reverse__a__linked__list_8cpp__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
0dfa9e86898d94413bac8a7a3cecff89
|
||||
83
db/da2/reverse__a__linked__list_8cpp__incl.svg
Normal file
@@ -0,0 +1,83 @@
|
||||
<?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: data_structures/reverse_a_linked_list.cpp Pages: 1 -->
|
||||
<svg width="254pt" height="95pt"
|
||||
viewBox="0.00 0.00 254.00 95.00" 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 91)">
|
||||
<title>data_structures/reverse_a_linked_list.cpp</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-91 250,-91 250,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Implementation of Reversing a single linked list">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="69.5,-56.5 69.5,-86.5 191.5,-86.5 191.5,-56.5 69.5,-56.5"/>
|
||||
<text text-anchor="start" x="77.5" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures/reverse</text>
|
||||
<text text-anchor="middle" x="130.5" y="-63.5" font-family="Helvetica,sans-Serif" font-size="10.00">_a_linked_list.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:title=" ">
|
||||
<polygon fill="white" stroke="#bfbfbf" points="0,-0.5 0,-19.5 49,-19.5 49,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="24.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M105.38,-56.4C88.23,-46.77 65.64,-34.09 48.69,-24.58"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="50.36,-21.5 39.92,-19.66 46.93,-27.6 50.36,-21.5"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:title=" ">
|
||||
<polygon fill="white" stroke="#bfbfbf" points="67,-0.5 67,-19.5 122,-19.5 122,-0.5 67,-0.5"/>
|
||||
<text text-anchor="middle" x="94.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M121.97,-56.4C116.9,-48.02 110.43,-37.33 105.04,-28.42"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="107.91,-26.4 99.74,-19.66 101.92,-30.03 107.91,-26.4"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:title=" ">
|
||||
<polygon fill="white" stroke="#bfbfbf" points="140,-0.5 140,-19.5 193,-19.5 193,-0.5 140,-0.5"/>
|
||||
<text text-anchor="middle" x="166.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">memory</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M139.03,-56.4C144.1,-48.02 150.57,-37.33 155.96,-28.42"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="159.08,-30.03 161.26,-19.66 153.09,-26.4 159.08,-30.03"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a xlink:title=" ">
|
||||
<polygon fill="white" stroke="#bfbfbf" points="211,-0.5 211,-19.5 246,-19.5 246,-0.5 211,-0.5"/>
|
||||
<text text-anchor="middle" x="228.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">new</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M153.72,-56.4C169.29,-46.95 189.7,-34.56 205.26,-25.11"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="207.51,-27.84 214.24,-19.66 203.88,-21.86 207.51,-27.84"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -131,7 +131,7 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of <a href="https://en.wikipedia.org/wiki/Kadane%27s_algorithm" target="_blank">Kadane Algorithm</a> </p>
|
||||
<p >Kadane algorithm is used to find the maximum sum subarray in an array and maximum sum subarray problem is the task of finding a contiguous subarray with the largest sum</p>
|
||||
<h3><a class="anchor" id="autotoc_md63"></a>
|
||||
<h3><a class="anchor" id="autotoc_md64"></a>
|
||||
Algorithm</h3>
|
||||
<p >The simple idea of the algorithm is to search for all positive contiguous segments of the array and keep track of maximum sum contiguous segment among all positive segments(curr_sum is used for this) Each time we get a positive sum we compare it with max_sum and update max_sum if it is greater than curr_sum</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/ayush523" target="_blank">Ayush Singh</a> </dd></dl>
|
||||
|
||||
@@ -145,7 +145,7 @@ Functions</h2></td></tr>
|
||||
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> and <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></p>
|
||||
<p >Mathematical algorithms</p>
|
||||
<p >Given a recurrence relation; evaluate the value of nth term. For e.g., For fibonacci series, recurrence series is <code>f(n) = f(n-1) + f(n-2)</code> where <code>f(0) = 0</code> and <code>f(1) = 1</code>. Note that the method used only demonstrates recurrence relation with one variable (n), unlike <code>nCr</code> problem, since it has two (n, r)</p>
|
||||
<h3><a class="anchor" id="autotoc_md76"></a>
|
||||
<h3><a class="anchor" id="autotoc_md77"></a>
|
||||
Algorithm</h3>
|
||||
<p >This problem can be solved using matrix exponentiation method. </p><dl class="section see"><dt>See also</dt><dd>here for simple <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_exponentiation.cpp" target="_blank">number exponentiation algorithm</a> or <a href="https://en.wikipedia.org/wiki/Exponentiation_by_squaring" target="_blank">explaination here</a>. </dd></dl>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/AshishYUO" target="_blank">Ashish Daulatabad</a> for assert for IO operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> STL</dd></dl>
|
||||
|
||||
@@ -144,7 +144,7 @@ Functions</h2></td></tr>
|
||||
</div><!-- fragment --><p >The direction ratios (DR) are calculated as follows: 1st DR, J: (b * z) - (c * y) 2nd DR, A: -((a * z) - (c * x)) 3rd DR, N: (a * y) - (b * x)</p>
|
||||
<p >Therefore, the direction ratios of the cross product are: J, A, N The following C++ Program calculates the direction ratios of the cross products of two vector. The program uses a function, <a class="el" href="../../df/d66/vector__cross__product_8cpp.html#a225732399c5c076976eae5b180a9f8c9" title="Function to calculate the cross product of the passed arrays containing the direction ratios of the t...">cross()</a> for doing so. The direction ratios for the first and the second vector has to be passed one by one seperated by a space character.</p>
|
||||
<p >Magnitude of a vector is the square root of the sum of the squares of the direction ratios.</p>
|
||||
<h3><a class="anchor" id="autotoc_md78"></a>
|
||||
<h3><a class="anchor" id="autotoc_md79"></a>
|
||||
Example:</h3>
|
||||
<p >An example of a running instance of the executable program: </p><pre class="fragment">Pass the first Vector: 1 2 3
|
||||
</pre><p> Pass the second Vector: 4 5 6 The cross product is: -3 6 -3 Magnitude: 7.34847</p>
|
||||
|
||||
@@ -128,6 +128,9 @@ Files</h2></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="df/dd0/queue__using__two__stacks_8cpp.html">queue_using_two_stacks.cpp</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="d6/d05/reverse__a__linked__list_8cpp.html">reverse_a_linked_list.cpp</a></td></tr>
|
||||
<tr class="memdesc:d6/d05/reverse__a__linked__list_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Implementation of <a href="https://simple.wikipedia.org/wiki/Linked_list" target="_blank">Reversing a single linked list</a> <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="d0/d5a/skip__list_8cpp.html">skip_list.cpp</a></td></tr>
|
||||
<tr class="memdesc:d0/d5a/skip__list_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Data structure for fast searching and insertion in \(O(\log n)\) time. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
||||
@@ -12,6 +12,7 @@ var dir_2e746e9d06bf2d8ff842208bcc6ebcfc =
|
||||
[ "queue.h", "d8/d38/queue_8h_source.html", null ],
|
||||
[ "queue_using_array.cpp", "d8/df0/queue__using__array_8cpp.html", "d8/df0/queue__using__array_8cpp" ],
|
||||
[ "queue_using_two_stacks.cpp", "df/dd0/queue__using__two__stacks_8cpp.html", "df/dd0/queue__using__two__stacks_8cpp" ],
|
||||
[ "reverse_a_linked_list.cpp", "d6/d05/reverse__a__linked__list_8cpp.html", "d6/d05/reverse__a__linked__list_8cpp" ],
|
||||
[ "skip_list.cpp", "d0/d5a/skip__list_8cpp.html", "d0/d5a/skip__list_8cpp" ],
|
||||
[ "sparse_table.cpp", "d6/d42/data__structures_2sparse__table_8cpp.html", "d6/d42/data__structures_2sparse__table_8cpp" ],
|
||||
[ "stack.h", "d7/de0/stack_8h.html", [
|
||||
|
||||
15
files.html
@@ -135,13 +135,14 @@ solve-a-rat-in-a-maze-c-java-pytho/" </td></tr>
|
||||
<tr id="row_3_9_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="d8/d38/queue_8h_source.html"><span class="icondoc"></span></a><b>queue.h</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_3_10_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d8/df0/queue__using__array_8cpp.html" target="_self">queue_using_array.cpp</a></td><td class="desc">Implementation of Linear <a href="https://www.geeksforgeeks.org/array-implementation-of-queue-simple/" target="_blank">Queue using array</a> </td></tr>
|
||||
<tr id="row_3_11_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="df/dd0/queue__using__two__stacks_8cpp.html" target="_self">queue_using_two_stacks.cpp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_3_12_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d0/d5a/skip__list_8cpp.html" target="_self">skip_list.cpp</a></td><td class="desc">Data structure for fast searching and insertion in \(O(\log n)\) time </td></tr>
|
||||
<tr id="row_3_13_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d6/d42/data__structures_2sparse__table_8cpp.html" target="_self">sparse_table.cpp</a></td><td class="desc">Implementation of <a href="https://brilliant.org/wiki/sparse-table/" target="_blank">Sparse Table</a> for <code><a class="el" href="da/d52/minimum__edit__distance_8cpp.html#a0138c226bd79ffe6d839c787cfc60347" title="Takes input of the cost of three operations: Insert, Replace and Delete and return the minimum cost a...">min()</a></code> function </td></tr>
|
||||
<tr id="row_3_14_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="d7/de0/stack_8h_source.html"><span class="icondoc"></span></a><a class="el" href="d7/de0/stack_8h.html" target="_self">stack.h</a></td><td class="desc">This class specifies the basic operation on a stack as a linked list </td></tr>
|
||||
<tr id="row_3_15_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="db/dbc/tree__234_8cpp.html" target="_self">tree_234.cpp</a></td><td class="desc">A demo 2-3-4 tree implementation </td></tr>
|
||||
<tr id="row_3_16_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="dc/d93/trie__modern_8cpp.html" target="_self">trie_modern.cpp</a></td><td class="desc">A basic implementation of trie class to store only lower-case strings </td></tr>
|
||||
<tr id="row_3_17_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d7/d83/trie__tree_8cpp.html" target="_self">trie_tree.cpp</a></td><td class="desc">Implementation of <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure for English alphabets in small characters </td></tr>
|
||||
<tr id="row_3_18_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d5/d8a/trie__using__hashmap_8cpp.html" target="_self">trie_using_hashmap.cpp</a></td><td class="desc">Implementation of <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure using HashMap for different characters and method for predicting words based on prefix </td></tr>
|
||||
<tr id="row_3_12_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d6/d05/reverse__a__linked__list_8cpp.html" target="_self">reverse_a_linked_list.cpp</a></td><td class="desc">Implementation of <a href="https://simple.wikipedia.org/wiki/Linked_list" target="_blank">Reversing a single linked list</a> </td></tr>
|
||||
<tr id="row_3_13_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d0/d5a/skip__list_8cpp.html" target="_self">skip_list.cpp</a></td><td class="desc">Data structure for fast searching and insertion in \(O(\log n)\) time </td></tr>
|
||||
<tr id="row_3_14_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d6/d42/data__structures_2sparse__table_8cpp.html" target="_self">sparse_table.cpp</a></td><td class="desc">Implementation of <a href="https://brilliant.org/wiki/sparse-table/" target="_blank">Sparse Table</a> for <code><a class="el" href="da/d52/minimum__edit__distance_8cpp.html#a0138c226bd79ffe6d839c787cfc60347" title="Takes input of the cost of three operations: Insert, Replace and Delete and return the minimum cost a...">min()</a></code> function </td></tr>
|
||||
<tr id="row_3_15_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="d7/de0/stack_8h_source.html"><span class="icondoc"></span></a><a class="el" href="d7/de0/stack_8h.html" target="_self">stack.h</a></td><td class="desc">This class specifies the basic operation on a stack as a linked list </td></tr>
|
||||
<tr id="row_3_16_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="db/dbc/tree__234_8cpp.html" target="_self">tree_234.cpp</a></td><td class="desc">A demo 2-3-4 tree implementation </td></tr>
|
||||
<tr id="row_3_17_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="dc/d93/trie__modern_8cpp.html" target="_self">trie_modern.cpp</a></td><td class="desc">A basic implementation of trie class to store only lower-case strings </td></tr>
|
||||
<tr id="row_3_18_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d7/d83/trie__tree_8cpp.html" target="_self">trie_tree.cpp</a></td><td class="desc">Implementation of <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure for English alphabets in small characters </td></tr>
|
||||
<tr id="row_3_19_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="d5/d8a/trie__using__hashmap_8cpp.html" target="_self">trie_using_hashmap.cpp</a></td><td class="desc">Implementation of <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure using HashMap for different characters and method for predicting words based on prefix </td></tr>
|
||||
<tr id="row_4_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_4_" class="arrow" onclick="toggleFolder('4_')">►</span><span id="img_4_" class="iconfclosed" onclick="toggleFolder('4_')"> </span><a class="el" href="dir_93bc990c5cceb745f78af6949e9ef947.html" target="_self">divide_and_conquer</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_4_0_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="da/dd3/karatsuba__algorithm__for__fast__multiplication_8cpp.html" target="_self">karatsuba_algorithm_for_fast_multiplication.cpp</a></td><td class="desc">Implementation of the <a href="https://en.wikipedia.org/wiki/Karatsuba_algorithm" target="_blank">Karatsuba algorithm for fast multiplication</a> </td></tr>
|
||||
<tr id="row_5_"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_5_" class="arrow" onclick="toggleFolder('5_')">►</span><span id="img_5_" class="iconfclosed" onclick="toggleFolder('5_')"> </span><a class="el" href="dir_8a20dd5bfd5341a725342bf72b6b686f.html" target="_self">dynamic_programming</a></td><td class="desc"></td></tr>
|
||||
|
||||
@@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('functions_func_i.html',''); initResiza
|
||||
<li>Info() : <a class="el" href="da/d70/structmachine__learning_1_1aystar__search_1_1_ay_star_search_1_1_info.html#aaa7ea27346659f0abe2df82ca57fc5a7">machine_learning::aystar_search::AyStarSearch< Puzzle >::Info</a></li>
|
||||
<li>init() : <a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">range_queries::heavy_light_decomposition::HLD< X ></a>, <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">range_queries::heavy_light_decomposition::Tree< X ></a></li>
|
||||
<li>inOrderIterative() : <a class="el" href="d9/d12/classothers_1_1iterative__tree__traversals_1_1_binary_tree.html#a0c33f2c1a3a3deb486a1c33ee5239499">others::iterative_tree_traversals::BinaryTree</a></li>
|
||||
<li>insert() : <a class="el" href="d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">binary_search_tree< T ></a>, <a class="el" href="d5/dab/structdata__structures_1_1list__array_1_1list.html#a0f44d5e3a52d35f8ff23ace9569c6305">data_structures::list_array::list</a></li>
|
||||
<li>insert() : <a class="el" href="d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">binary_search_tree< T ></a>, <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">data_structures::linked_list::list</a>, <a class="el" href="d5/dab/structdata__structures_1_1list__array_1_1list.html#a0f44d5e3a52d35f8ff23ace9569c6305">data_structures::list_array::list</a></li>
|
||||
<li>Insert() : <a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html#a02df91964915ca97609d35f847faff5f">data_structures::tree_234::Tree234</a></li>
|
||||
<li>insert() : <a class="el" href="d0/d3e/classdata__structures_1_1trie.html#a0ab94bc6417e3f59fab33cea5b64d546">data_structures::trie</a>, <a class="el" href="d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">data_structures::trie_using_hashmap::Trie</a></li>
|
||||
<li>Insert() : <a class="el" href="d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a7ecb75b985b1ffc575a880274f855b1c">operations_on_datastructures::trie_operations::Tnode</a></li>
|
||||
|
||||
@@ -102,6 +102,7 @@ $(document).ready(function(){initNavTree('functions_func_r.html',''); initResiza
|
||||
<li>RemoveItemByIndex() : <a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html#a28944bb16ec22650b47fe3e80e3e13f8">data_structures::tree_234::Node</a></li>
|
||||
<li>RemovePreMerge() : <a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html#a61dd051a74e5f36c8dc03dae8dca6ef4">data_structures::tree_234::Tree234</a></li>
|
||||
<li>removeWordHelper() : <a class="el" href="dd/d2f/class_trie.html#a26941759ecf94d67a27d4a610bc0f63d">Trie</a></li>
|
||||
<li>reverseList() : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70">data_structures::linked_list::list</a></li>
|
||||
<li>right() : <a class="el" href="d2/d05/class_min_heap.html#ac760b85cf90265b8d674b942a43fb70e">MinHeap</a></li>
|
||||
<li>RightRotate() : <a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html#ae68f8e62be02657c1287def6b38d7cc9">data_structures::tree_234::Tree234</a></li>
|
||||
<li>RootedTree() : <a class="el" href="d0/d58/classgraph_1_1_rooted_tree.html#aacdeecac857623e9fbfe92590f3c504d">graph::RootedTree</a></li>
|
||||
|
||||
@@ -97,7 +97,8 @@ $(document).ready(function(){initNavTree('functions_func_t.html',''); initResiza
|
||||
<li>testCase_1() : <a class="el" href="d5/d58/class_test_cases.html#ac2636e8b5b9e053374c45bfcf0603008">TestCases</a></li>
|
||||
<li>testCase_2() : <a class="el" href="d5/d58/class_test_cases.html#abae0148985f159b582a385cf399254e3">TestCases</a></li>
|
||||
<li>testCase_3() : <a class="el" href="d5/d58/class_test_cases.html#ad9f95c09931625b41e3be1f88d1e28c5">TestCases</a></li>
|
||||
<li>top() : <a class="el" href="d1/dc2/classstack.html#a21c0bb6ce7dcfe445cc12031977ea344">stack< Type ></a></li>
|
||||
<li>top() : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d">data_structures::linked_list::list</a>, <a class="el" href="d1/dc2/classstack.html#a21c0bb6ce7dcfe445cc12031977ea344">stack< Type ></a></li>
|
||||
<li>traverse() : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">data_structures::linked_list::list</a></li>
|
||||
<li>Traverse() : <a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html#a84ab7b4fe7442b5e2eeed8c050bb86bd">data_structures::tree_234::Tree234</a></li>
|
||||
<li>traverse_inorder() : <a class="el" href="d9/dde/classbinary__search__tree.html#a2fcf37549bd002c174a45b0b4203c2bd">binary_search_tree< T ></a></li>
|
||||
<li>traverse_postorder() : <a class="el" href="d9/dde/classbinary__search__tree.html#a87c0a35845d27e0f6fc1f4eaa0333362">binary_search_tree< T ></a></li>
|
||||
|
||||
@@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('functions_i.html',''); initResizable()
|
||||
<li>Info : <a class="el" href="da/d02/classmachine__learning_1_1aystar__search_1_1_ay_star_search.html#a47b9bc9815a2e7123ac1dc13e5377301">machine_learning::aystar_search::AyStarSearch< Puzzle ></a>, <a class="el" href="da/d70/structmachine__learning_1_1aystar__search_1_1_ay_star_search_1_1_info.html#aaa7ea27346659f0abe2df82ca57fc5a7">machine_learning::aystar_search::AyStarSearch< Puzzle >::Info</a></li>
|
||||
<li>init() : <a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">range_queries::heavy_light_decomposition::HLD< X ></a>, <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">range_queries::heavy_light_decomposition::Tree< X ></a></li>
|
||||
<li>inOrderIterative() : <a class="el" href="d9/d12/classothers_1_1iterative__tree__traversals_1_1_binary_tree.html#a0c33f2c1a3a3deb486a1c33ee5239499">others::iterative_tree_traversals::BinaryTree</a></li>
|
||||
<li>insert() : <a class="el" href="d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">binary_search_tree< T ></a>, <a class="el" href="d5/dab/structdata__structures_1_1list__array_1_1list.html#a0f44d5e3a52d35f8ff23ace9569c6305">data_structures::list_array::list</a></li>
|
||||
<li>insert() : <a class="el" href="d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">binary_search_tree< T ></a>, <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#a4649fc2c5d09dc58608cd9299db9946f">data_structures::linked_list::list</a>, <a class="el" href="d5/dab/structdata__structures_1_1list__array_1_1list.html#a0f44d5e3a52d35f8ff23ace9569c6305">data_structures::list_array::list</a></li>
|
||||
<li>Insert() : <a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html#a02df91964915ca97609d35f847faff5f">data_structures::tree_234::Tree234</a></li>
|
||||
<li>insert() : <a class="el" href="d0/d3e/classdata__structures_1_1trie.html#a0ab94bc6417e3f59fab33cea5b64d546">data_structures::trie</a>, <a class="el" href="d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">data_structures::trie_using_hashmap::Trie</a></li>
|
||||
<li>Insert() : <a class="el" href="d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a7ecb75b985b1ffc575a880274f855b1c">operations_on_datastructures::trie_operations::Tnode</a></li>
|
||||
|
||||
@@ -95,7 +95,7 @@ $(document).ready(function(){initNavTree('functions_l.html',''); initResizable()
|
||||
<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
|
||||
<li>label : <a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">range_queries::heavy_light_decomposition::HLD< X ></a></li>
|
||||
<li>large_number() : <a class="el" href="db/d82/classlarge__number.html#a10119a83839e65962621b73df46a5337">large_number</a></li>
|
||||
<li>last : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">data_structures::linked_list::list</a></li>
|
||||
<li>last : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">data_structures::linked_list::list</a></li>
|
||||
<li>lazy() : <a class="el" href="d8/d28/classrange__queries_1_1per_seg_tree.html#ace7f57935b3bb9446f11c239fd89ae79">range_queries::perSegTree</a></li>
|
||||
<li>lca() : <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">range_queries::heavy_light_decomposition::Tree< X ></a></li>
|
||||
<li>left : <a class="el" href="dd/db6/structbinary__search__tree_1_1bst__node.html#a55c165b9e0e5b50a23104e0604dcc788">binary_search_tree< T >::bst_node</a>, <a class="el" href="d2/d05/class_min_heap.html#aa8c6c141e3de664819686aa637e1afca">MinHeap</a>, <a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html#a9ccef4c746b7226488b014f5bac4789a">operations_on_datastructures::inorder_traversal_of_bst::Node</a>, <a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html#a1dbaeff928e469a05251879568515b8e">others::iterative_tree_traversals::Node</a></li>
|
||||
|
||||
@@ -100,7 +100,7 @@ $(document).ready(function(){initNavTree('functions_n.html',''); initResizable()
|
||||
<li>NeuralNetwork() : <a class="el" href="d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html#a4c4c6f63ab965317f9471518ee931b89">machine_learning::neural_network::NeuralNetwork</a></li>
|
||||
<li>new_val() : <a class="el" href="d7/d7c/classstatistics_1_1stats__computer1.html#aa13bf7c38de112f71921a5525d71a2f2">statistics::stats_computer1< T ></a>, <a class="el" href="d8/dab/classstatistics_1_1stats__computer2.html#ade6de704deea24fdc88077b3d9a0d534">statistics::stats_computer2< T ></a></li>
|
||||
<li>newKid() : <a class="el" href="d8/d28/classrange__queries_1_1per_seg_tree.html#a0cec4b77d264521717cf9b0482c45817">range_queries::perSegTree</a></li>
|
||||
<li>next : <a class="el" href="dd/d1c/classhash__chain.html#a48236d44349c3ebce4774b706f4f8a0f">hash_chain</a>, <a class="el" href="d8/d10/structlist.html#a1900fe79e875e2838625b2eb60837f8f">list</a>, <a class="el" href="d5/da1/structnode.html#a135f25acadfbba644f848f1aa18d8350">node< Kind ></a>, <a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html#afe96e03dd6a404480ab43d1e88363a7a">search::sublist_search::Node</a></li>
|
||||
<li>next : <a class="el" href="d4/d0e/classdata__structures_1_1linked__list_1_1_node.html#acfccd7b52c91d91300c5b317e5ec7a6e">data_structures::linked_list::Node</a>, <a class="el" href="dd/d1c/classhash__chain.html#a48236d44349c3ebce4774b706f4f8a0f">hash_chain</a>, <a class="el" href="d8/d10/structlist.html#a1900fe79e875e2838625b2eb60837f8f">list</a>, <a class="el" href="d5/da1/structnode.html#a135f25acadfbba644f848f1aa18d8350">node< Kind ></a>, <a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html#afe96e03dd6a404480ab43d1e88363a7a">search::sublist_search::Node</a></li>
|
||||
<li>Node() : <a class="el" href="d9/d49/structdata__structures_1_1_node.html#a54a6777e72b639c3ee6446a541db8e78">data_structures::Node</a>, <a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html#ad5219979ea9a8baa3a273a9ec0f0c670">data_structures::tree_234::Node</a>, <a class="el" href="dd/d1c/classhash__chain.html#a28d3adffc0126beeef63bce0846fb8f5">hash_chain</a></li>
|
||||
<li>NUM_CHARS : <a class="el" href="d0/d3e/classdata__structures_1_1trie.html#a4bfac4be6ed1a34c7159eddb42469191">data_structures::trie</a></li>
|
||||
<li>num_digits() : <a class="el" href="db/d82/classlarge__number.html#ac09a05ec4aafb4d9e0b4440d6f0e2a93">large_number</a></li>
|
||||
|
||||
@@ -103,6 +103,7 @@ $(document).ready(function(){initNavTree('functions_r.html',''); initResizable()
|
||||
<li>RemoveItemByIndex() : <a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html#a28944bb16ec22650b47fe3e80e3e13f8">data_structures::tree_234::Node</a></li>
|
||||
<li>RemovePreMerge() : <a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html#a61dd051a74e5f36c8dc03dae8dca6ef4">data_structures::tree_234::Tree234</a></li>
|
||||
<li>removeWordHelper() : <a class="el" href="dd/d2f/class_trie.html#a26941759ecf94d67a27d4a610bc0f63d">Trie</a></li>
|
||||
<li>reverseList() : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#a8b20ca89a0346c8d4193936481528c70">data_structures::linked_list::list</a></li>
|
||||
<li>right : <a class="el" href="dd/db6/structbinary__search__tree_1_1bst__node.html#a05f3a7aa6c31622f855ce4b5a95e91df">binary_search_tree< T >::bst_node</a>, <a class="el" href="d2/d05/class_min_heap.html#ac760b85cf90265b8d674b942a43fb70e">MinHeap</a>, <a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html#a9b4ae6f5179a1c8ecfd563811a59e6c0">operations_on_datastructures::inorder_traversal_of_bst::Node</a>, <a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html#af19e39acfc18b823be9d4879a20e1143">others::iterative_tree_traversals::Node</a>, <a class="el" href="d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html#a9adb4639a0797e94a3e556b6b902c088">range_queries::perSegTree::Node</a></li>
|
||||
<li>RightRotate() : <a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html#ae68f8e62be02657c1287def6b38d7cc9">data_structures::tree_234::Tree234</a></li>
|
||||
<li>root : <a class="el" href="d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">graph::RootedTree</a></li>
|
||||
|
||||
@@ -105,7 +105,8 @@ $(document).ready(function(){initNavTree('functions_t.html',''); initResizable()
|
||||
<li>testCase_1() : <a class="el" href="d5/d58/class_test_cases.html#ac2636e8b5b9e053374c45bfcf0603008">TestCases</a></li>
|
||||
<li>testCase_2() : <a class="el" href="d5/d58/class_test_cases.html#abae0148985f159b582a385cf399254e3">TestCases</a></li>
|
||||
<li>testCase_3() : <a class="el" href="d5/d58/class_test_cases.html#ad9f95c09931625b41e3be1f88d1e28c5">TestCases</a></li>
|
||||
<li>top() : <a class="el" href="d1/dc2/classstack.html#a21c0bb6ce7dcfe445cc12031977ea344">stack< Type ></a>, <a class="el" href="d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">tower</a></li>
|
||||
<li>top() : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#ab2d20da40d800897c31a649799d5e43d">data_structures::linked_list::list</a>, <a class="el" href="d1/dc2/classstack.html#a21c0bb6ce7dcfe445cc12031977ea344">stack< Type ></a>, <a class="el" href="d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">tower</a></li>
|
||||
<li>traverse() : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#af42071da0067130389cb12fc526ea4fe">data_structures::linked_list::list</a></li>
|
||||
<li>Traverse() : <a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html#a84ab7b4fe7442b5e2eeed8c050bb86bd">data_structures::tree_234::Tree234</a></li>
|
||||
<li>traverse_inorder() : <a class="el" href="d9/dde/classbinary__search__tree.html#a2fcf37549bd002c174a45b0b4203c2bd">binary_search_tree< T ></a></li>
|
||||
<li>traverse_postorder() : <a class="el" href="d9/dde/classbinary__search__tree.html#a87c0a35845d27e0f6fc1f4eaa0333362">binary_search_tree< T ></a></li>
|
||||
|
||||
@@ -160,7 +160,7 @@ $(document).ready(function(){initNavTree('functions_vars.html',''); initResizabl
|
||||
|
||||
<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
|
||||
<li>label : <a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">range_queries::heavy_light_decomposition::HLD< X ></a></li>
|
||||
<li>last : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">data_structures::linked_list::list</a></li>
|
||||
<li>last : <a class="el" href="d1/def/classdata__structures_1_1linked__list_1_1list.html#ab87eecc80068fc5a80e98e83536885f2">data_structures::linked_list::list</a></li>
|
||||
<li>left : <a class="el" href="dd/db6/structbinary__search__tree_1_1bst__node.html#a55c165b9e0e5b50a23104e0604dcc788">binary_search_tree< T >::bst_node</a>, <a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html#a9ccef4c746b7226488b014f5bac4789a">operations_on_datastructures::inorder_traversal_of_bst::Node</a>, <a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html#a1dbaeff928e469a05251879568515b8e">others::iterative_tree_traversals::Node</a></li>
|
||||
<li>level : <a class="el" href="d4/d90/classdata__structures_1_1_skip_list.html#a3e249c2c35a8b7f5ffd2d77fee60d650">data_structures::SkipList</a>, <a class="el" href="d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">graph::RootedTree</a></li>
|
||||
<li>LOG : <a class="el" href="da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html#a6cf72f93b1551f0d943c585b4f173be3">data_structures::sparse_table::Sparse_table</a></li>
|
||||
@@ -176,7 +176,7 @@ $(document).ready(function(){initNavTree('functions_vars.html',''); initResizabl
|
||||
<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
|
||||
<li>n : <a class="el" href="da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html#ad71ecd43d0af1127df5f4006258f9635">data_structures::sparse_table::Sparse_table</a>, <a class="el" href="d8/d69/classgraph_1_1_h_k_graph.html#a6f5a9fdbb83ef731d739ba6707e21c3c">graph::HKGraph</a>, <a class="el" href="de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">graph::is_graph_bipartite::Graph</a></li>
|
||||
<li>neighbors : <a class="el" href="dc/d61/classgraph_1_1_graph.html#a59940c462861f2fcf4951d1b6c084e6a">graph::Graph< T ></a></li>
|
||||
<li>next : <a class="el" href="dd/d1c/classhash__chain.html#a48236d44349c3ebce4774b706f4f8a0f">hash_chain</a>, <a class="el" href="d8/d10/structlist.html#a1900fe79e875e2838625b2eb60837f8f">list</a>, <a class="el" href="d5/da1/structnode.html#a135f25acadfbba644f848f1aa18d8350">node< Kind ></a>, <a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html#afe96e03dd6a404480ab43d1e88363a7a">search::sublist_search::Node</a></li>
|
||||
<li>next : <a class="el" href="d4/d0e/classdata__structures_1_1linked__list_1_1_node.html#acfccd7b52c91d91300c5b317e5ec7a6e">data_structures::linked_list::Node</a>, <a class="el" href="dd/d1c/classhash__chain.html#a48236d44349c3ebce4774b706f4f8a0f">hash_chain</a>, <a class="el" href="d8/d10/structlist.html#a1900fe79e875e2838625b2eb60837f8f">list</a>, <a class="el" href="d5/da1/structnode.html#a135f25acadfbba644f848f1aa18d8350">node< Kind ></a>, <a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html#afe96e03dd6a404480ab43d1e88363a7a">search::sublist_search::Node</a></li>
|
||||
<li>NUM_CHARS : <a class="el" href="d0/d3e/classdata__structures_1_1trie.html#a4bfac4be6ed1a34c7159eddb42469191">data_structures::trie</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -139,54 +139,55 @@ This inheritance list is sorted roughly, but not completely, alphabetically:</di
|
||||
<tr id="row_38_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d77/structmst.html" target="_self">mst</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_39_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html" target="_self">math::ncr_modulo_p::NCRModuloP</a></td><td class="desc">Class which contains all methods required for calculating nCr mod p </td></tr>
|
||||
<tr id="row_40_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html" target="_self">machine_learning::neural_network::NeuralNetwork</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_41_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d49/structdata__structures_1_1_node.html" target="_self">data_structures::Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_42_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html" target="_self">data_structures::tree_234::Node</a></td><td class="desc">2-3-4 tree node class </td></tr>
|
||||
<tr id="row_43_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html" target="_self">data_structures::trie_using_hashmap::Trie::Node</a></td><td class="desc">Struct representing a trie node </td></tr>
|
||||
<tr id="row_44_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/da1/structnode.html" target="_self">node< Kind ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_41_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/d0e/classdata__structures_1_1linked__list_1_1_node.html" target="_self">data_structures::linked_list::Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_42_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d49/structdata__structures_1_1_node.html" target="_self">data_structures::Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_43_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html" target="_self">data_structures::tree_234::Node</a></td><td class="desc">2-3-4 tree node class </td></tr>
|
||||
<tr id="row_44_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html" target="_self">data_structures::trie_using_hashmap::Trie::Node</a></td><td class="desc">Struct representing a trie node </td></tr>
|
||||
<tr id="row_45_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d8b/struct_node.html" target="_self">Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_46_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html" target="_self">operations_on_datastructures::inorder_traversal_of_bst::Node</a></td><td class="desc">A <a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html" title="A Node structure representing a single node in BST.">Node</a> structure representing a single node in BST </td></tr>
|
||||
<tr id="row_47_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html" target="_self">others::iterative_tree_traversals::Node</a></td><td class="desc">Defines the structure of a node of the tree </td></tr>
|
||||
<tr id="row_48_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html" target="_self">range_queries::perSegTree::Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_49_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html" target="_self">search::sublist_search::Node</a></td><td class="desc">A <a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html" title="A Node structure representing a single link Node in a linked list.">Node</a> structure representing a single link <a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html" title="A Node structure representing a single link Node in a linked list.">Node</a> in a linked list </td></tr>
|
||||
<tr id="row_50_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d28/classrange__queries_1_1per_seg_tree.html" target="_self">range_queries::perSegTree</a></td><td class="desc">Range query here is range sum, but the code can be modified to make different queries like range max or min </td></tr>
|
||||
<tr id="row_51_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" target="_self">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="desc">Definition of struct <a class="el" href="d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> </td></tr>
|
||||
<tr id="row_52_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d5a/structgeometry_1_1jarvis_1_1_point.html" target="_self">geometry::jarvis::Point</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_53_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dc8/struct_point.html" target="_self">Point</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_54_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d1b/structquery.html" target="_self">query</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_55_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/da9/classqueue.html" target="_self">queue< Kind ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_46_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/da1/structnode.html" target="_self">node< Kind ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_47_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html" target="_self">operations_on_datastructures::inorder_traversal_of_bst::Node</a></td><td class="desc">A <a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html" title="A Node structure representing a single node in BST.">Node</a> structure representing a single node in BST </td></tr>
|
||||
<tr id="row_48_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html" target="_self">others::iterative_tree_traversals::Node</a></td><td class="desc">Defines the structure of a node of the tree </td></tr>
|
||||
<tr id="row_49_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html" target="_self">range_queries::perSegTree::Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_50_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html" target="_self">search::sublist_search::Node</a></td><td class="desc">A <a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html" title="A Node structure representing a single link Node in a linked list.">Node</a> structure representing a single link <a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html" title="A Node structure representing a single link Node in a linked list.">Node</a> in a linked list </td></tr>
|
||||
<tr id="row_51_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d28/classrange__queries_1_1per_seg_tree.html" target="_self">range_queries::perSegTree</a></td><td class="desc">Range query here is range sum, but the code can be modified to make different queries like range max or min </td></tr>
|
||||
<tr id="row_52_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" target="_self">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="desc">Definition of struct <a class="el" href="d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> </td></tr>
|
||||
<tr id="row_53_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d5a/structgeometry_1_1jarvis_1_1_point.html" target="_self">geometry::jarvis::Point</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_54_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dc8/struct_point.html" target="_self">Point</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_55_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d1b/structquery.html" target="_self">query</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_56_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/db5/struct_queue.html" target="_self">Queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_57_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html" target="_self">data_structures::queue_using_array::Queue_Array</a></td><td class="desc"><a class="el" href="d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html" title="Queue_Array class containing the main data and also index of head and tail of the array.">Queue_Array</a> class containing the main data and also index of head and tail of the array </td></tr>
|
||||
<tr id="row_58_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d72/class_r_btree.html" target="_self">RBtree</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_59_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/db4/struct_segment_intersection.html" target="_self">SegmentIntersection</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_60_"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_60_" class="arrow" onclick="toggleFolder('60_')">▼</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html" target="_self">range_queries::heavy_light_decomposition::SG< X ></a></td><td class="desc">Segment <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" title="A Basic Tree, which supports binary lifting.">Tree</a>, to store heavy chains </td></tr>
|
||||
<tr id="row_60_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" target="_self">range_queries::heavy_light_decomposition::HLD< X ></a></td><td class="desc">The Heavy-Light Decomposition class </td></tr>
|
||||
<tr id="row_61_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/d90/classdata__structures_1_1_skip_list.html" target="_self">data_structures::SkipList</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_62_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d4f/class_solution.html" target="_self">Solution</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_63_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html" target="_self">data_structures::sparse_table::Sparse_table</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_64_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d8a/classothers_1_1postfix__expression_1_1_stack.html" target="_self">others::postfix_expression::Stack</a></td><td class="desc">Creates an array to be used as stack for storing values </td></tr>
|
||||
<tr id="row_65_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/dc2/classstack.html" target="_self">stack< Type ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_66_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dc4/classstack__linked_list.html" target="_self">stack_linkedList</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_67_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d7c/classstatistics_1_1stats__computer1.html" target="_self">statistics::stats_computer1< T ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_68_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dab/classstatistics_1_1stats__computer2.html" target="_self">statistics::stats_computer2< T ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_69_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d58/class_test_cases.html" target="_self">TestCases</a></td><td class="desc">Class encapsulating the necessary test cases </td></tr>
|
||||
<tr id="row_70_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html" target="_self">operations_on_datastructures::trie_operations::Tnode</a></td><td class="desc">Class defining the structure of trie node and containing the methods to perform operations on them </td></tr>
|
||||
<tr id="row_71_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d2c/structtower.html" target="_self">tower</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_72_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_72_" class="arrow" onclick="toggleFolder('72_')">▼</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" target="_self">range_queries::heavy_light_decomposition::Tree< X ></a></td><td class="desc">A Basic <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" title="A Basic Tree, which supports binary lifting.">Tree</a>, which supports binary lifting </td></tr>
|
||||
<tr id="row_72_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" target="_self">range_queries::heavy_light_decomposition::HLD< X ></a></td><td class="desc">The Heavy-Light Decomposition class </td></tr>
|
||||
<tr id="row_73_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html" target="_self">data_structures::tree_234::Tree234</a></td><td class="desc">2-3-4 tree class </td></tr>
|
||||
<tr id="row_74_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/d3e/classdata__structures_1_1trie.html" target="_self">data_structures::trie</a></td><td class="desc"><a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> implementation for small-case English alphabets <code>a-z</code> </td></tr>
|
||||
<tr id="row_75_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html" target="_self">data_structures::trie_using_hashmap::Trie</a></td><td class="desc"><a class="el" href="d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html" title="Trie class, implementation of trie using hashmap in each trie node for all the characters of char16_t...">Trie</a> class, implementation of trie using hashmap in each trie node for all the characters of char16_t(UTF-16)type with methods to insert, delete, search, start with and to recommend words based on a given prefix </td></tr>
|
||||
<tr id="row_76_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d2f/class_trie.html" target="_self">Trie</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_77_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/d48/struct_trie_1_1_trie_node.html" target="_self">Trie::TrieNode</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_78_"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_78_" class="arrow" onclick="toggleFolder('78_')">▼</span><span class="icona"><span class="icon">C</span></span><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integral_constant.html">std::true_type</a> [external]</td><td class="desc"></td></tr>
|
||||
<tr id="row_78_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dfc/structstd_1_1is__arithmetic_3_01uint128__t_01_4.html" target="_self">std::is_arithmetic< uint128_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_78_1_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/d6d/structstd_1_1is__arithmetic_3_01uint256__t_01_4.html" target="_self">std::is_arithmetic< uint256_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_78_2_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dd4/structstd_1_1is__integral_3_01uint128__t_01_4.html" target="_self">std::is_integral< uint128_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_78_3_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d47/structstd_1_1is__integral_3_01uint256__t_01_4.html" target="_self">std::is_integral< uint256_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_78_4_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d25/structstd_1_1is__unsigned_3_01uint128__t_01_4.html" target="_self">std::is_unsigned< uint128_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_78_5_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d99/structstd_1_1is__unsigned_3_01uint256__t_01_4.html" target="_self">std::is_unsigned< uint256_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_79_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d9a/classuint128__t.html" target="_self">uint128_t</a></td><td class="desc">Class for 128-bit unsigned integer </td></tr>
|
||||
<tr id="row_80_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d83/classuint256__t.html" target="_self">uint256_t</a></td><td class="desc">Class for 256-bit unsigned integer </td></tr>
|
||||
<tr id="row_57_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/da9/classqueue.html" target="_self">queue< Kind ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_58_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html" target="_self">data_structures::queue_using_array::Queue_Array</a></td><td class="desc"><a class="el" href="d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html" title="Queue_Array class containing the main data and also index of head and tail of the array.">Queue_Array</a> class containing the main data and also index of head and tail of the array </td></tr>
|
||||
<tr id="row_59_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d72/class_r_btree.html" target="_self">RBtree</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_60_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/db4/struct_segment_intersection.html" target="_self">SegmentIntersection</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_61_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_61_" class="arrow" onclick="toggleFolder('61_')">▼</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html" target="_self">range_queries::heavy_light_decomposition::SG< X ></a></td><td class="desc">Segment <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" title="A Basic Tree, which supports binary lifting.">Tree</a>, to store heavy chains </td></tr>
|
||||
<tr id="row_61_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" target="_self">range_queries::heavy_light_decomposition::HLD< X ></a></td><td class="desc">The Heavy-Light Decomposition class </td></tr>
|
||||
<tr id="row_62_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/d90/classdata__structures_1_1_skip_list.html" target="_self">data_structures::SkipList</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_63_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d4f/class_solution.html" target="_self">Solution</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_64_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html" target="_self">data_structures::sparse_table::Sparse_table</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_65_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d8a/classothers_1_1postfix__expression_1_1_stack.html" target="_self">others::postfix_expression::Stack</a></td><td class="desc">Creates an array to be used as stack for storing values </td></tr>
|
||||
<tr id="row_66_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/dc2/classstack.html" target="_self">stack< Type ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_67_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dc4/classstack__linked_list.html" target="_self">stack_linkedList</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_68_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d7c/classstatistics_1_1stats__computer1.html" target="_self">statistics::stats_computer1< T ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_69_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dab/classstatistics_1_1stats__computer2.html" target="_self">statistics::stats_computer2< T ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_70_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d58/class_test_cases.html" target="_self">TestCases</a></td><td class="desc">Class encapsulating the necessary test cases </td></tr>
|
||||
<tr id="row_71_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html" target="_self">operations_on_datastructures::trie_operations::Tnode</a></td><td class="desc">Class defining the structure of trie node and containing the methods to perform operations on them </td></tr>
|
||||
<tr id="row_72_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d2c/structtower.html" target="_self">tower</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_73_"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_73_" class="arrow" onclick="toggleFolder('73_')">▼</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" target="_self">range_queries::heavy_light_decomposition::Tree< X ></a></td><td class="desc">A Basic <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" title="A Basic Tree, which supports binary lifting.">Tree</a>, which supports binary lifting </td></tr>
|
||||
<tr id="row_73_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" target="_self">range_queries::heavy_light_decomposition::HLD< X ></a></td><td class="desc">The Heavy-Light Decomposition class </td></tr>
|
||||
<tr id="row_74_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d95/classdata__structures_1_1tree__234_1_1_tree234.html" target="_self">data_structures::tree_234::Tree234</a></td><td class="desc">2-3-4 tree class </td></tr>
|
||||
<tr id="row_75_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/d3e/classdata__structures_1_1trie.html" target="_self">data_structures::trie</a></td><td class="desc"><a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> implementation for small-case English alphabets <code>a-z</code> </td></tr>
|
||||
<tr id="row_76_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html" target="_self">data_structures::trie_using_hashmap::Trie</a></td><td class="desc"><a class="el" href="d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html" title="Trie class, implementation of trie using hashmap in each trie node for all the characters of char16_t...">Trie</a> class, implementation of trie using hashmap in each trie node for all the characters of char16_t(UTF-16)type with methods to insert, delete, search, start with and to recommend words based on a given prefix </td></tr>
|
||||
<tr id="row_77_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d2f/class_trie.html" target="_self">Trie</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_78_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/d48/struct_trie_1_1_trie_node.html" target="_self">Trie::TrieNode</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_79_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_79_" class="arrow" onclick="toggleFolder('79_')">▼</span><span class="icona"><span class="icon">C</span></span><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integral_constant.html">std::true_type</a> [external]</td><td class="desc"></td></tr>
|
||||
<tr id="row_79_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dfc/structstd_1_1is__arithmetic_3_01uint128__t_01_4.html" target="_self">std::is_arithmetic< uint128_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_79_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/d6d/structstd_1_1is__arithmetic_3_01uint256__t_01_4.html" target="_self">std::is_arithmetic< uint256_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_79_2_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dd4/structstd_1_1is__integral_3_01uint128__t_01_4.html" target="_self">std::is_integral< uint128_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_79_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d47/structstd_1_1is__integral_3_01uint256__t_01_4.html" target="_self">std::is_integral< uint256_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_79_4_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d25/structstd_1_1is__unsigned_3_01uint128__t_01_4.html" target="_self">std::is_unsigned< uint128_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_79_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d99/structstd_1_1is__unsigned_3_01uint256__t_01_4.html" target="_self">std::is_unsigned< uint256_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_80_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d9a/classuint128__t.html" target="_self">uint128_t</a></td><td class="desc">Class for 128-bit unsigned integer </td></tr>
|
||||
<tr id="row_81_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d83/classuint256__t.html" target="_self">uint256_t</a></td><td class="desc">Class for 256-bit unsigned integer </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
|
||||
@@ -43,11 +43,12 @@ var hierarchy =
|
||||
[ "mst", "d1/d77/structmst.html", null ],
|
||||
[ "math::ncr_modulo_p::NCRModuloP", "d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html", null ],
|
||||
[ "machine_learning::neural_network::NeuralNetwork", "d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html", null ],
|
||||
[ "data_structures::linked_list::Node", "d4/d0e/classdata__structures_1_1linked__list_1_1_node.html", null ],
|
||||
[ "data_structures::Node", "d9/d49/structdata__structures_1_1_node.html", null ],
|
||||
[ "data_structures::tree_234::Node", "dd/d40/classdata__structures_1_1tree__234_1_1_node.html", null ],
|
||||
[ "data_structures::trie_using_hashmap::Trie::Node", "d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html", null ],
|
||||
[ "node< Kind >", "d5/da1/structnode.html", null ],
|
||||
[ "Node", "db/d8b/struct_node.html", null ],
|
||||
[ "node< Kind >", "d5/da1/structnode.html", null ],
|
||||
[ "operations_on_datastructures::inorder_traversal_of_bst::Node", "d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html", null ],
|
||||
[ "others::iterative_tree_traversals::Node", "d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html", null ],
|
||||
[ "range_queries::perSegTree::Node", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html", null ],
|
||||
@@ -57,8 +58,8 @@ var hierarchy =
|
||||
[ "geometry::jarvis::Point", "d9/d5a/structgeometry_1_1jarvis_1_1_point.html", null ],
|
||||
[ "Point", "d8/dc8/struct_point.html", null ],
|
||||
[ "query", "dd/d1b/structquery.html", null ],
|
||||
[ "queue< Kind >", "db/da9/classqueue.html", null ],
|
||||
[ "Queue", "dc/db5/struct_queue.html", null ],
|
||||
[ "queue< Kind >", "db/da9/classqueue.html", null ],
|
||||
[ "data_structures::queue_using_array::Queue_Array", "d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html", null ],
|
||||
[ "RBtree", "d8/d72/class_r_btree.html", null ],
|
||||
[ "SegmentIntersection", "d4/db4/struct_segment_intersection.html", null ],
|
||||
|
||||
@@ -95,10 +95,10 @@ $(document).ready(function(){initNavTree('index.html',''); initResizable(); });
|
||||
<div class="contents">
|
||||
<div class="textblock"><p ><a class="anchor" id="mainpage"></a></p>
|
||||
<p ><a href="https://gitpod.io/#https://github.com/TheAlgorithms/C-Plus-Plus" target="_blank"><img src="https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod" alt="Gitpod Ready-to-Code" class="inline"/></a> <a href="https://lgtm.com/projects/g/TheAlgorithms/C-Plus-Plus/context:cpp" target="_blank"><img src="https://img.shields.io/lgtm/grade/cpp/g/TheAlgorithms/C-Plus-Plus.svg?logo=lgtm&logoWidth=18" alt="Language grade: C/C++" style="pointer-events: none;" class="inline"/></a> <a href="https://github.com/TheAlgorithms/C-Plus-Plus/actions/workflows/codeql_analysis.yml" target="_blank"><img src="https://github.com/TheAlgorithms/C-Plus-Plus/actions/workflows/codeql_analysis.yml/badge.svg" alt="CodeQL CI" style="pointer-events: none;" class="inline"/></a> <a href="https://gitter.im/TheAlgorithms" target="_blank"><img src="https://img.shields.io/badge/Chat-Gitter-ff69b4.svg?label=Chat&logo=gitter&style=flat-square" alt="Gitter chat" style="pointer-events: none;" class="inline"/></a> <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md" target="_blank"><img src="https://img.shields.io/static/v1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square" alt="contributions welcome" style="pointer-events: none;" class="inline"/></a> <img src="https://img.shields.io/github/repo-size/TheAlgorithms/C-Plus-Plus?color=red&style=flat-square" alt="GitHub repo size" class="inline"/> <a href="https://TheAlgorithms.github.io/C-Plus-Plus" target="_blank"><img src="https://github.com/TheAlgorithms/C-Plus-Plus/workflows/Doxygen%20CI/badge.svg" alt="Doxygen CI" style="pointer-events: none;" class="inline"/></a> <a href="https://github.com/TheAlgorithms/C-Plus-Plus/actions?query=workflow%3A%22Awesome+CI+Workflow%22" target="_blank"><img src="https://github.com/TheAlgorithms/C-Plus-Plus/workflows/Awesome%20CI%20Workflow/badge.svg" alt="Awesome CI" style="pointer-events: none;" class="inline"/></a> <a href="https://liberapay.com/TheAlgorithms" target="_blank"><img src="https://img.shields.io/liberapay/receives/TheAlgorithms.svg?logo=liberapay" alt="Income" style="pointer-events: none;" class="inline"/></a> <a href="https://discord.gg/c7MnfGFGa6" target="_blank"><img src="https://img.shields.io/discord/808045925556682782.svg?logo=discord&colorB=7289DA" alt="Discord chat" style="pointer-events: none;" class="inline"/></a> <a href="https://liberapay.com/TheAlgorithms/donate" target="_blank"><img src="https://liberapay.com/assets/widgets/donate.svg" alt="Donate" style="pointer-events: none;" class="inline"/></a></p>
|
||||
<h1><a class="anchor" id="autotoc_md89"></a>
|
||||
<h1><a class="anchor" id="autotoc_md90"></a>
|
||||
Overview</h1>
|
||||
<p >This repository is a collection of open-source implementation of a variety of algorithms implemented in C++ and licensed under <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/LICENSE" target="_blank">MIT License</a>. These algorithms span a variety of topics from computer science, mathematics and statistics, data science, machine learning, engineering, etc.. The implementations and the associated documentation are meant to provide a learning resource for educators and students. Hence, one may find more than one implementation for the same objective but using a different algorithm strategies and optimizations.</p>
|
||||
<h1><a class="anchor" id="autotoc_md90"></a>
|
||||
<h1><a class="anchor" id="autotoc_md91"></a>
|
||||
Features</h1>
|
||||
<ul>
|
||||
<li>The repository provides implementations of various algorithms in one of the most fundamental general purpose languages - <a href="https://en.wikipedia.org/wiki/C%2B%2B" target="_blank">C++</a>.</li>
|
||||
@@ -109,12 +109,12 @@ Features</h1>
|
||||
<li>Self-checks within programs ensure correct implementations with confidence.</li>
|
||||
<li>Modular implementations and OpenSource licensing enable the functions to be utilized conveniently in other applications.</li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md91"></a>
|
||||
<h1><a class="anchor" id="autotoc_md92"></a>
|
||||
Documentation</h1>
|
||||
<p ><a href="https://TheAlgorithms.github.io/C-Plus-Plus" target="_blank">Online Documentation</a> is generated from the repository source codes directly. The documentation contains all resources including source code snippets, details on execution of the programs, diagrammatic representation of program flow, and links to external resources where necessary. The documentation also introduces interactive source code with links to documentation for C++ STL library functions used. Click on <a href="https://TheAlgorithms.github.io/C-Plus-Plus/files.html" target="_blank">Files menu</a> to see the list of all the files documented with the code.</p>
|
||||
<p ><a href="https://thealgorithms.github.io/C-Plus-Plus" target="_blank">Documentation of Algorithms in C++</a> by <a href="https://github.com/TheAlgorithms/C-Plus-Plus/graphs/contributors" target="_blank">The Algorithms Contributors</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1" target="_blank">CC BY-SA 4.0</a><br />
|
||||
<a href="https://creativecommons.org/licenses/by-sa/4.0"><img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="Creative Commons License" style="pointer-events: none; height:22px!important;margin-left: 3px;vertical-align:text-bottom;" class="inline"/><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="Credit must be given to the creator" style="pointer-events: none; height:22px!important;margin-left: 3px;vertical-align:text-bottom;" class="inline"/><img src="https://mirrors.creativecommons.org/presskit/icons/sa.svg" alt="Adaptations must be shared under the same terms" style="pointer-events: none; height:22px!important;margin-left: 3px;vertical-align:text-bottom;" class="inline"/></a></p>
|
||||
<h1><a class="anchor" id="autotoc_md92"></a>
|
||||
<h1><a class="anchor" id="autotoc_md93"></a>
|
||||
Contributions</h1>
|
||||
<p >As a community developed and maintained repository, we welcome new un-plagiarized quality contributions. Please read our <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md" target="_blank">Contribution Guidelines</a>. </p>
|
||||
</div></div><!-- PageDoc -->
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<map id="Graphical Class Hierarchy" name="Graphical Class Hierarchy">
|
||||
<area shape="rect" id="node1" href="$d5/dab/structdata__structures_1_1list__array_1_1list.html" title="Structure of List with supporting methods." alt="" coords="5,5,143,47"/>
|
||||
<area shape="rect" id="node1" href="$d4/d0e/classdata__structures_1_1linked__list_1_1_node.html" title=" " alt="" coords="5,5,161,47"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8b10ed21001ae43ebb02b0fc74f2c517
|
||||
d57400eb9de671d3442759337d4a98a7
|
||||
@@ -4,18 +4,18 @@
|
||||
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
|
||||
-->
|
||||
<!-- Title: Graphical Class Hierarchy Pages: 1 -->
|
||||
<svg width="111pt" height="39pt"
|
||||
viewBox="0.00 0.00 111.00 39.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="125pt" height="39pt"
|
||||
viewBox="0.00 0.00 125.00 39.00" 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 35)">
|
||||
<title>Graphical Class Hierarchy</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 107,-35 107,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 121,-35 121,4 -4,4"/>
|
||||
<!-- Node0 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node0</title>
|
||||
<g id="a_node1"><a xlink:href="d5/dab/structdata__structures_1_1list__array_1_1list.html" target="_top" xlink:title="Structure of List with supporting methods.">
|
||||
<polygon fill="white" stroke="black" points="0,-0.5 0,-30.5 103,-30.5 103,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::list</text>
|
||||
<text text-anchor="middle" x="51.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_array::list</text>
|
||||
<g id="a_node1"><a xlink:href="d4/d0e/classdata__structures_1_1linked__list_1_1_node.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="0,-0.5 0,-30.5 117,-30.5 117,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::Node</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -1,3 +1,3 @@
|
||||
<map id="Graphical Class Hierarchy" name="Graphical Class Hierarchy">
|
||||
<area shape="rect" id="node1" href="$d9/d49/structdata__structures_1_1_node.html" title=" " alt="" coords="5,5,159,32"/>
|
||||
<area shape="rect" id="node1" href="$d5/dab/structdata__structures_1_1list__array_1_1list.html" title="Structure of List with supporting methods." alt="" coords="5,5,143,47"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
fd8db4a243911e756e3ab0d4372e4989
|
||||
8b10ed21001ae43ebb02b0fc74f2c517
|
||||
@@ -4,17 +4,18 @@
|
||||
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
|
||||
-->
|
||||
<!-- Title: Graphical Class Hierarchy Pages: 1 -->
|
||||
<svg width="123pt" height="28pt"
|
||||
viewBox="0.00 0.00 123.00 28.00" 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 24)">
|
||||
<svg width="111pt" height="39pt"
|
||||
viewBox="0.00 0.00 111.00 39.00" 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 35)">
|
||||
<title>Graphical Class Hierarchy</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-24 119,-24 119,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 107,-35 107,4 -4,4"/>
|
||||
<!-- Node0 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node0</title>
|
||||
<g id="a_node1"><a xlink:href="d9/d49/structdata__structures_1_1_node.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="0,-0.5 0,-19.5 115,-19.5 115,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="57.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::Node</text>
|
||||
<g id="a_node1"><a xlink:href="d5/dab/structdata__structures_1_1list__array_1_1list.html" target="_top" xlink:title="Structure of List with supporting methods.">
|
||||
<polygon fill="white" stroke="black" points="0,-0.5 0,-30.5 103,-30.5 103,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::list</text>
|
||||
<text text-anchor="middle" x="51.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_array::list</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.2 KiB |