Documentation for 3406be6d0b

This commit is contained in:
github-actions
2021-10-19 22:01:52 +00:00
parent 419f6e8f4e
commit e4c172f067
232 changed files with 5577 additions and 2786 deletions

View File

@@ -0,0 +1,530 @@
<!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++: operations_on_datastructures::reverse_binary_tree::BinaryTree 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">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.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-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="../../dd/d03/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">operations_on_datastructures::reverse_binary_tree::BinaryTree Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>A Binary Tree class that implements a Binary Search Tree (BST) by default.
<a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for operations_on_datastructures::reverse_binary_tree::BinaryTree:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d25/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree__coll__graph.svg" width="271" 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:abcb1cc8da7b6759dc92cbe0254697c56"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#abcb1cc8da7b6759dc92cbe0254697c56">BinaryTree</a> ()</td></tr>
<tr class="memdesc:abcb1cc8da7b6759dc92cbe0254697c56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html" title="A Binary Tree class that implements a Binary Search Tree (BST) by default.">BinaryTree</a> with a root pointing to NULL. <a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#abcb1cc8da7b6759dc92cbe0254697c56">More...</a><br /></td></tr>
<tr class="separator:abcb1cc8da7b6759dc92cbe0254697c56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb44646a26a446efae7704c80efc011b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#abb44646a26a446efae7704c80efc011b">BinaryTree</a> (int64_t <a class="el" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>)</td></tr>
<tr class="memdesc:abb44646a26a446efae7704c80efc011b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html" title="A Binary Tree class that implements a Binary Search Tree (BST) by default.">BinaryTree</a> with a root with an initial value. <a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#abb44646a26a446efae7704c80efc011b">More...</a><br /></td></tr>
<tr class="separator:abb44646a26a446efae7704c80efc011b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a534645d1aabdf1a7e5897c85376f173d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a534645d1aabdf1a7e5897c85376f173d">add</a> (int64_t <a class="el" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>)</td></tr>
<tr class="memdesc:a534645d1aabdf1a7e5897c85376f173d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a new <a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html" title="A Node struct that represents a single node in a Binary Tree.">Node</a> to the Binary Tree. <a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a534645d1aabdf1a7e5897c85376f173d">More...</a><br /></td></tr>
<tr class="separator:a534645d1aabdf1a7e5897c85376f173d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c0d27198372b36ef71bc58af8336b9c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a1c0d27198372b36ef71bc58af8336b9c">reverse</a> ()</td></tr>
<tr class="separator:a1c0d27198372b36ef71bc58af8336b9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e683b271d8d5cd63e0d09cf8aaa325c"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int64_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c">get_level_order</a> ()</td></tr>
<tr class="memdesc:a2e683b271d8d5cd63e0d09cf8aaa325c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Level order traversal of a tree consists of visiting its elements, top to bottom, left to right. This function performs level order traversal and returns the node datas as a vector. <a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c">More...</a><br /></td></tr>
<tr class="separator:a2e683b271d8d5cd63e0d09cf8aaa325c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cf972a2c994a4fa1a89fc77bd5ad503"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a5cf972a2c994a4fa1a89fc77bd5ad503">print</a> ()</td></tr>
<tr class="memdesc:a5cf972a2c994a4fa1a89fc77bd5ad503"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints all of the elements in the tree to stdout level-by-level, using the <a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c" title="Level order traversal of a tree consists of visiting its elements, top to bottom, left to right....">get_level_order()</a> function. <a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a5cf972a2c994a4fa1a89fc77bd5ad503">More...</a><br /></td></tr>
<tr class="separator:a5cf972a2c994a4fa1a89fc77bd5ad503"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:adb2b6be741b0500ee75d89b6d06b5d50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50">insert</a> (int64_t <a class="el" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>, <a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> *pivot)</td></tr>
<tr class="memdesc:adb2b6be741b0500ee75d89b6d06b5d50"><td class="mdescLeft">&#160;</td><td class="mdescRight">inserts a node in the Binary Tree, with the behaviouur of a Binary Search Tree. <a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50">More...</a><br /></td></tr>
<tr class="separator:adb2b6be741b0500ee75d89b6d06b5d50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6f974381f523fdb981fc2d843bbf4a1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1">reverseBinaryTree</a> (<a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> *pivot)</td></tr>
<tr class="memdesc:af6f974381f523fdb981fc2d843bbf4a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reverses a Binary Tree recursively by swapping the left and right subtrees and their children. <a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1">More...</a><br /></td></tr>
<tr class="separator:af6f974381f523fdb981fc2d843bbf4a1"><td class="memSeparator" colspan="2">&#160;</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>
<tr class="memitem:ab6a17a04aa93aaaef71e038e8cc2edeb"><td class="memItemLeft" align="right" valign="top"><a id="ab6a17a04aa93aaaef71e038e8cc2edeb" name="ab6a17a04aa93aaaef71e038e8cc2edeb"></a>
<a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>root</b></td></tr>
<tr class="memdesc:ab6a17a04aa93aaaef71e038e8cc2edeb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to root node of Binary Tree. <br /></td></tr>
<tr class="separator:ab6a17a04aa93aaaef71e038e8cc2edeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >A Binary Tree class that implements a Binary Search Tree (BST) by default. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="abcb1cc8da7b6759dc92cbe0254697c56" name="abcb1cc8da7b6759dc92cbe0254697c56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abcb1cc8da7b6759dc92cbe0254697c56">&#9670;&nbsp;</a></span>BinaryTree() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">operations_on_datastructures::reverse_binary_tree::BinaryTree::BinaryTree </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>Creates a <a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html" title="A Binary Tree class that implements a Binary Search Tree (BST) by default.">BinaryTree</a> with a root pointing to NULL. </p>
<div class="fragment"><div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>{ <a class="code hl_variable" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">root</a> = <span class="keyword">nullptr</span>; }</div>
<div class="ttc" id="aclassoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_html_ab6a17a04aa93aaaef71e038e8cc2edeb"><div class="ttname"><a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">operations_on_datastructures::reverse_binary_tree::BinaryTree::root</a></div><div class="ttdeci">Node * root</div><div class="ttdoc">Pointer to root node of Binary Tree.</div><div class="ttdef"><b>Definition:</b> reverse_binary_tree.cpp:54</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="abb44646a26a446efae7704c80efc011b" name="abb44646a26a446efae7704c80efc011b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb44646a26a446efae7704c80efc011b">&#9670;&nbsp;</a></span>BinaryTree() <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">operations_on_datastructures::reverse_binary_tree::BinaryTree::BinaryTree </td>
<td>(</td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>data</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html" title="A Binary Tree class that implements a Binary Search Tree (BST) by default.">BinaryTree</a> with a root with an initial value. </p>
<div class="fragment"><div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span>{ <a class="code hl_variable" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">root</a> = <span class="keyword">new</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a>(<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>); }</div>
<div class="ttc" id="ahash__search_8cpp_html_a6e1a77282bc65ad359d753d25df23243"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a></div><div class="ttdeci">int data[MAX]</div><div class="ttdoc">test data</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:24</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><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a534645d1aabdf1a7e5897c85376f173d" name="a534645d1aabdf1a7e5897c85376f173d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a534645d1aabdf1a7e5897c85376f173d">&#9670;&nbsp;</a></span>add()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void operations_on_datastructures::reverse_binary_tree::BinaryTree::add </td>
<td>(</td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>data</em></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>Adds a new <a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html" title="A Node struct that represents a single node in a Binary Tree.">Node</a> to the Binary Tree. </p>
<div class="fragment"><div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span>{ <a class="code hl_variable" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">root</a> = <a class="code hl_function" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50">insert</a>(<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>, <a class="code hl_variable" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">root</a>); }</div>
<div class="ttc" id="aclassoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_html_adb2b6be741b0500ee75d89b6d06b5d50"><div class="ttname"><a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50">operations_on_datastructures::reverse_binary_tree::BinaryTree::insert</a></div><div class="ttdeci">Node * insert(int64_t data, Node *pivot)</div><div class="ttdoc">inserts a node in the Binary Tree, with the behaviouur of a Binary Search Tree.</div><div class="ttdef"><b>Definition:</b> reverse_binary_tree.cpp:65</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="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_a534645d1aabdf1a7e5897c85376f173d_cgraph.svg" width="528" height="91"><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="a2e683b271d8d5cd63e0d09cf8aaa325c" name="a2e683b271d8d5cd63e0d09cf8aaa325c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e683b271d8d5cd63e0d09cf8aaa325c">&#9670;&nbsp;</a></span>get_level_order()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int64_t &gt; operations_on_datastructures::reverse_binary_tree::BinaryTree::get_level_order </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>Level order traversal of a tree consists of visiting its elements, top to bottom, left to right. This function performs level order traversal and returns the node datas as a vector. </p>
<p >The function uses a queue to append and remove elements as they are visited, and then adds their children, if any. This ensures that the elements are visited layer-by-layer, starting from the root of the Tree. </p><dl class="section return"><dt>Returns</dt><dd>vector&lt;int64_t&gt; of nodes of the tree. </dd></dl>
<p >&lt; Result vector of int</p>
<p >&lt; Return empty vector if root is Invalid</p>
<p >&lt; <a class="el" href="../../dc/db5/struct_queue.html">Queue</a> of the nodes in the tree</p>
<p >&lt; Insert root into the queue</p>
<p >&lt; Copy the first element</p>
<p >&lt; Add the element to the data</p>
<p >&lt; Remove element</p>
<p >&lt; Insert left node</p>
<p >&lt; Insert right node</p>
<p >Add nodes while Tree is not empty</p>
<div class="fragment"><div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> {</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int64_t&gt;</a> <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>; <span class="comment">///&lt; Result vector of int</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">root</a> == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>; <span class="comment">///&lt; Return empty vector if root is Invalid</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> }</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue&lt;Node*&gt;</a> nodes; <span class="comment">///&lt; Queue of the nodes in the tree</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> nodes.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(<a class="code hl_variable" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">root</a>); <span class="comment">///&lt; Insert root into the queue</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">while</span> (!nodes.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/empty.html">empty</a>()) {</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a>* temp = nodes.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/front.html">front</a>(); <span class="comment">///&lt; Copy the first element</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>.push_back(temp-&gt;data); <span class="comment">///&lt; Add the element to the data</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> nodes.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/pop.html">pop</a>(); <span class="comment">///&lt; Remove element</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">if</span> (temp-&gt;left != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> nodes.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(temp-&gt;left); <span class="comment">///&lt; Insert left node</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> }</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">if</span> (temp-&gt;right != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> nodes.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(temp-&gt;right); <span class="comment">///&lt; Insert right node</span></div>
<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="comment">/// Add nodes while Tree is not empty</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>;</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> }</div>
<div class="ttc" id="aempty_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/empty.html">std::queue::empty</a></div><div class="ttdeci">T empty(T... args)</div></div>
<div class="ttc" id="afront_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/front.html">std::queue::front</a></div><div class="ttdeci">T front(T... args)</div></div>
<div class="ttc" id="apop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/pop.html">std::queue::pop</a></div><div class="ttdeci">T pop(T... args)</div></div>
<div class="ttc" id="apush_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/push.html">std::queue::push</a></div><div class="ttdeci">T push(T... args)</div></div>
<div class="ttc" id="aqueue_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</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="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_a2e683b271d8d5cd63e0d09cf8aaa325c_cgraph.svg" width="407" height="190"><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="adb2b6be741b0500ee75d89b6d06b5d50" name="adb2b6be741b0500ee75d89b6d06b5d50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb2b6be741b0500ee75d89b6d06b5d50">&#9670;&nbsp;</a></span>insert()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> * operations_on_datastructures::reverse_binary_tree::BinaryTree::insert </td>
<td>(</td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> *&#160;</td>
<td class="paramname"><em>pivot</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>inserts a node in the Binary Tree, with the behaviouur of a Binary Search Tree. </p>
<p >Nodes with smaller values are inserted in the left subtree, and Nodes with larger values are inserted into the right subtree recursively. Time Complexity: O(log(n)) </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>The data/value of the <a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html" title="A Node struct that represents a single node in a Binary Tree.">Node</a> to be inserted </td></tr>
<tr><td class="paramname">pivot</td><td>A pointer to the root node of the (sub)tree </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html" title="A Node struct that represents a single node in a Binary Tree.">Node</a> pointer to the root </dd></dl>
<p >&lt; Create new node</p>
<p >&lt; Insert <a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html" title="A Node struct that represents a single node in a Binary Tree.">Node</a> to the left</p>
<p >&lt; Insert node to the right</p>
<div class="fragment"><div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">if</span> (pivot == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a>(<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>); <span class="comment">///&lt; Create new node</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">if</span> (data &lt;= pivot-&gt;<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>) {</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> pivot-&gt;left =</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_function" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50">insert</a>(<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>, pivot-&gt;left); <span class="comment">///&lt; Insert Node to the left</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> pivot-&gt;right =</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50">insert</a>(<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>, pivot-&gt;right); <span class="comment">///&lt; Insert node to the right</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> }</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">return</span> pivot;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> }</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="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_adb2b6be741b0500ee75d89b6d06b5d50_cgraph.svg" width="231" height="91"><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="a5cf972a2c994a4fa1a89fc77bd5ad503" name="a5cf972a2c994a4fa1a89fc77bd5ad503"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cf972a2c994a4fa1a89fc77bd5ad503">&#9670;&nbsp;</a></span>print()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void operations_on_datastructures::reverse_binary_tree::BinaryTree::print </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>Prints all of the elements in the tree to stdout level-by-level, using the <a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c" title="Level order traversal of a tree consists of visiting its elements, top to bottom, left to right....">get_level_order()</a> function. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p >Print each element in the tree</p>
<p >Print newline</p>
<div class="fragment"><div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> {</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i : <a class="code hl_function" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c">get_level_order</a>()) {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; i &lt;&lt; <span class="stringliteral">&quot; &quot;</span>; <span class="comment">/// Print each element in the tree</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>; <span class="comment">/// Print newline</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</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="aclassoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_html_a2e683b271d8d5cd63e0d09cf8aaa325c"><div class="ttname"><a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c">operations_on_datastructures::reverse_binary_tree::BinaryTree::get_level_order</a></div><div class="ttdeci">std::vector&lt; int64_t &gt; get_level_order()</div><div class="ttdoc">Level order traversal of a tree consists of visiting its elements, top to bottom, left to right....</div><div class="ttdef"><b>Definition:</b> reverse_binary_tree.cpp:121</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_a5cf972a2c994a4fa1a89fc77bd5ad503_cgraph.svg" width="100%" height="442"><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>
<a id="a1c0d27198372b36ef71bc58af8336b9c" name="a1c0d27198372b36ef71bc58af8336b9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c0d27198372b36ef71bc58af8336b9c">&#9670;&nbsp;</a></span>reverse()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void operations_on_datastructures::reverse_binary_tree::BinaryTree::reverse </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 >Reverses the Binary Tree </p>
<div class="fragment"><div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>{ <a class="code hl_variable" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">root</a> = <a class="code hl_function" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1">reverseBinaryTree</a>(<a class="code hl_variable" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb">root</a>); }</div>
<div class="ttc" id="aclassoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_html_af6f974381f523fdb981fc2d843bbf4a1"><div class="ttname"><a href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1">operations_on_datastructures::reverse_binary_tree::BinaryTree::reverseBinaryTree</a></div><div class="ttdeci">Node * reverseBinaryTree(Node *pivot)</div><div class="ttdoc">Reverses a Binary Tree recursively by swapping the left and right subtrees and their children.</div><div class="ttdef"><b>Definition:</b> reverse_binary_tree.cpp:84</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="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_a1c0d27198372b36ef71bc58af8336b9c_cgraph.svg" width="499" height="91"><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="af6f974381f523fdb981fc2d843bbf4a1" name="af6f974381f523fdb981fc2d843bbf4a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6f974381f523fdb981fc2d843bbf4a1">&#9670;&nbsp;</a></span>reverseBinaryTree()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> * operations_on_datastructures::reverse_binary_tree::BinaryTree::reverseBinaryTree </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> *&#160;</td>
<td class="paramname"><em>pivot</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reverses a Binary Tree recursively by swapping the left and right subtrees and their children. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pivot</td><td>A reference to the root of the (sub)tree </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html" title="A Node struct that represents a single node in a Binary Tree.">Node</a> pointer to root node </dd></dl>
<p >&lt; Base case</p>
<p >&lt; pointer to the left subtree</p>
<p >&lt; Swap</p>
<p >&lt; Swap</p>
<div class="fragment"><div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> {</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">if</span> (pivot == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">return</span> pivot; <span class="comment">///&lt; Base case</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> }</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a>* temp = pivot-&gt;left; <span class="comment">///&lt; pointer to the left subtree</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> pivot-&gt;left = <a class="code hl_function" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1">reverseBinaryTree</a>(pivot-&gt;right); <span class="comment">///&lt; Swap</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> pivot-&gt;right = <a class="code hl_function" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1">reverseBinaryTree</a>(temp); <span class="comment">///&lt; Swap</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">return</span> pivot;</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</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="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_af6f974381f523fdb981fc2d843bbf4a1_cgraph.svg" width="231" height="91"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>operations_on_datastructures/<a class="el" href="../../d4/db6/reverse__binary__tree_8cpp.html">reverse_binary_tree.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="../../da/d6d/namespaceoperations__on__datastructures.html">operations_on_datastructures</a></li><li class="navelem"><b>reverse_binary_tree</b></li><li class="navelem"><a class="el" href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html">BinaryTree</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
var classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree =
[
[ "BinaryTree", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#abcb1cc8da7b6759dc92cbe0254697c56", null ],
[ "BinaryTree", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#abb44646a26a446efae7704c80efc011b", null ],
[ "add", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a534645d1aabdf1a7e5897c85376f173d", null ],
[ "get_level_order", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c", null ],
[ "insert", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50", null ],
[ "print", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a5cf972a2c994a4fa1a89fc77bd5ad503", null ],
[ "reverse", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a1c0d27198372b36ef71bc58af8336b9c", null ],
[ "reverseBinaryTree", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1", null ],
[ "root", "de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#ab6a17a04aa93aaaef71e038e8cc2edeb", null ]
];

View File

@@ -0,0 +1,4 @@
<map id="operations_on_datastructures::reverse_binary_tree::BinaryTree::reverse" name="operations_on_datastructures::reverse_binary_tree::BinaryTree::reverse">
<area shape="rect" id="node1" title=" " alt="" coords="5,29,225,85"/>
<area shape="rect" id="node2" href="$de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1" title="Reverses a Binary Tree recursively by swapping the left and right subtrees and their children." alt="" coords="273,29,493,85"/>
</map>

View File

@@ -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.1 (20210923.0004)
-->
<!-- Title: operations_on_datastructures::reverse_binary_tree::BinaryTree::reverse Pages: 1 -->
<svg width="374pt" height="68pt"
viewBox="0.00 0.00 374.00 68.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 64)">
<title>operations_on_datastructures::reverse_binary_tree::BinaryTree::reverse</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-64 370,-64 370,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,-41.5 165,-41.5 165,-0.5 0,-0.5"/>
<text text-anchor="start" x="8" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree</text>
<text text-anchor="middle" x="82.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#af6f974381f523fdb981fc2d843bbf4a1" target="_top" xlink:title="Reverses a Binary Tree recursively by swapping the left and right subtrees and their children.">
<polygon fill="white" stroke="black" points="201,-0.5 201,-41.5 366,-41.5 366,-0.5 201,-0.5"/>
<text text-anchor="start" x="209" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="start" x="209" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree</text>
<text text-anchor="middle" x="283.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverseBinaryTree</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M165.02,-21C173.5,-21 182.17,-21 190.76,-21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="190.79,-24.5 200.79,-21 190.79,-17.5 190.79,-24.5"/>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M246.74,-41.86C242.73,-51.54 254.98,-60 283.5,-60 301.32,-60 312.79,-56.7 317.91,-51.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="321.38,-52.4 320.26,-41.86 314.56,-50.8 321.38,-52.4"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,7 @@
<map id="operations_on_datastructures::reverse_binary_tree::BinaryTree::get_level_order" name="operations_on_datastructures::reverse_binary_tree::BinaryTree::get_level_order">
<area shape="rect" id="node1" title="Level order traversal of a tree consists of visiting its elements, top to bottom, left to right...." alt="" coords="5,67,225,123"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="273,5,401,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="278,56,397,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="281,107,394,133"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="277,157,397,184"/>
</map>

View File

@@ -0,0 +1,84 @@
<?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.1 (20210923.0004)
-->
<!-- Title: operations_on_datastructures::reverse_binary_tree::BinaryTree::get_level_order Pages: 1 -->
<svg width="305pt" height="142pt"
viewBox="0.00 0.00 305.00 142.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 138)">
<title>operations_on_datastructures::reverse_binary_tree::BinaryTree::get_level_order</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-138 301,-138 301,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Level order traversal of a tree consists of visiting its elements, top to bottom, left to right....">
<polygon fill="#bfbfbf" stroke="black" points="0,-46.5 0,-87.5 165,-87.5 165,-46.5 0,-46.5"/>
<text text-anchor="start" x="8" y="-75.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="start" x="8" y="-64.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree</text>
<text text-anchor="middle" x="82.5" y="-53.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_level_order</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/container/queue/empty.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="201,-114.5 201,-133.5 297,-133.5 297,-114.5 201,-114.5"/>
<text text-anchor="middle" x="249" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M142.89,-87.58C165.56,-95.43 190.75,-104.16 210.79,-111.11"/>
<polygon fill="midnightblue" stroke="midnightblue" points="209.87,-114.49 220.47,-114.46 212.16,-107.88 209.87,-114.49"/>
</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/container/queue/front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="204.5,-76.5 204.5,-95.5 293.5,-95.5 293.5,-76.5 204.5,-76.5"/>
<text text-anchor="middle" x="249" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M165.27,-76.44C175.11,-77.58 184.96,-78.72 194.26,-79.79"/>
<polygon fill="midnightblue" stroke="midnightblue" points="194.15,-83.3 204.49,-80.97 194.96,-76.35 194.15,-83.3"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="206.5,-38.5 206.5,-57.5 291.5,-57.5 291.5,-38.5 206.5,-38.5"/>
<text text-anchor="middle" x="249" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M165.27,-57.56C175.8,-56.34 186.34,-55.12 196.21,-53.98"/>
<polygon fill="midnightblue" stroke="midnightblue" points="196.68,-57.45 206.21,-52.83 195.87,-50.5 196.68,-57.45"/>
</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/container/queue/push.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="204,-0.5 204,-19.5 294,-19.5 294,-0.5 204,-0.5"/>
<text text-anchor="middle" x="249" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M142.89,-46.42C165.56,-38.57 190.75,-29.84 210.79,-22.89"/>
<polygon fill="midnightblue" stroke="midnightblue" points="212.16,-26.12 220.47,-19.54 209.87,-19.51 212.16,-26.12"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -0,0 +1,4 @@
<map id="operations_on_datastructures::reverse_binary_tree::BinaryTree::add" name="operations_on_datastructures::reverse_binary_tree::BinaryTree::add">
<area shape="rect" id="node1" title="Adds a new Node to the Binary Tree." alt="" coords="5,37,255,78"/>
<area shape="rect" id="node2" href="$de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50" title="inserts a node in the Binary Tree, with the behaviouur of a Binary Search Tree." alt="" coords="303,29,523,85"/>
</map>

View File

@@ -0,0 +1,46 @@
<?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.1 (20210923.0004)
-->
<!-- Title: operations_on_datastructures::reverse_binary_tree::BinaryTree::add Pages: 1 -->
<svg width="396pt" height="68pt"
viewBox="0.00 0.00 396.00 68.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 64)">
<title>operations_on_datastructures::reverse_binary_tree::BinaryTree::add</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-64 392,-64 392,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Adds a new Node to the Binary Tree.">
<polygon fill="#bfbfbf" stroke="black" points="0,-6 0,-36 187,-36 187,-6 0,-6"/>
<text text-anchor="start" x="8" y="-24" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="middle" x="93.5" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree::add</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#adb2b6be741b0500ee75d89b6d06b5d50" target="_top" xlink:title="inserts a node in the Binary Tree, with the behaviouur of a Binary Search Tree.">
<polygon fill="white" stroke="black" points="223,-0.5 223,-41.5 388,-41.5 388,-0.5 223,-0.5"/>
<text text-anchor="start" x="231" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="start" x="231" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree</text>
<text text-anchor="middle" x="305.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::insert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M187.22,-21C195.66,-21 204.2,-21 212.63,-21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="212.84,-24.5 222.84,-21 212.84,-17.5 212.84,-24.5"/>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M266.54,-41.86C262.29,-51.54 275.27,-60 305.5,-60 324.39,-60 336.55,-56.7 341.97,-51.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="345.44,-52.41 344.46,-41.86 338.65,-50.72 345.44,-52.41"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,8 @@
<map id="operations_on_datastructures::reverse_binary_tree::BinaryTree::print" name="operations_on_datastructures::reverse_binary_tree::BinaryTree::print">
<area shape="rect" id="node1" title="Prints all of the elements in the tree to stdout level&#45;by&#45;level, using the get_level_order() function..." alt="" coords="5,74,259,115"/>
<area shape="rect" id="node2" href="$de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c" title="Level order traversal of a tree consists of visiting its elements, top to bottom, left to right...." alt="" coords="307,67,527,123"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="575,5,703,32"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="579,56,698,83"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="582,107,695,133"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="579,157,699,184"/>
</map>

View File

@@ -0,0 +1,188 @@
<?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.1 (20210923.0004)
-->
<!-- Title: operations_on_datastructures::reverse_binary_tree::BinaryTree::print Pages: 1 -->
<!--zoomable 142 -->
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
<style type="text/css"><![CDATA[
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="text/javascript"><![CDATA[
var edges = document.getElementsByTagName('g');
if (edges && edges.length) {
for (var i=0;i<edges.length;i++) {
if (edges[i].id.substr(0,4)=='edge') {
edges[i].setAttribute('class','edge');
}
}
}
]]></script>
<defs>
<circle id="rim" cx="0" cy="0" r="7"/>
<circle id="rim2" cx="0" cy="0" r="3.5"/>
<g id="zoomPlus">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/>
</use>
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
</g>
<g id="zoomMin">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/>
</use>
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
</g>
<g id="dirArrow">
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="resetDef">
<use xlink:href="#rim2" fill="#404040">
<set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/>
</use>
</g>
</defs>
<script type="text/javascript">
var viewWidth = 531;
var viewHeight = 142;
var sectionId = 'dynsection-4';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<title>operations_on_datastructures::reverse_binary_tree::BinaryTree::print</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-138 527,-138 527,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Prints all of the elements in the tree to stdout level&#45;by&#45;level, using the get_level_order() function...">
<polygon fill="#bfbfbf" stroke="black" points="0,-52 0,-82 190,-82 190,-52 0,-52"/>
<text text-anchor="start" x="8" y="-70" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="middle" x="95" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree::print</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c" target="_top" xlink:title="Level order traversal of a tree consists of visiting its elements, top to bottom, left to right....">
<polygon fill="white" stroke="black" points="226,-46.5 226,-87.5 391,-87.5 391,-46.5 226,-46.5"/>
<text text-anchor="start" x="234" y="-75.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="start" x="234" y="-64.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree</text>
<text text-anchor="middle" x="308.5" y="-53.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_level_order</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M190.31,-67C198.76,-67 207.32,-67 215.76,-67"/>
<polygon fill="midnightblue" stroke="midnightblue" points="215.97,-70.5 225.97,-67 215.97,-63.5 215.97,-70.5"/>
</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/container/queue/empty.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="427,-114.5 427,-133.5 523,-133.5 523,-114.5 427,-114.5"/>
<text text-anchor="middle" x="475" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M368.89,-87.58C391.56,-95.43 416.75,-104.16 436.79,-111.11"/>
<polygon fill="midnightblue" stroke="midnightblue" points="435.87,-114.49 446.47,-114.46 438.16,-107.88 435.87,-114.49"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="430.5,-76.5 430.5,-95.5 519.5,-95.5 519.5,-76.5 430.5,-76.5"/>
<text text-anchor="middle" x="475" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M391.27,-76.44C401.11,-77.58 410.96,-78.72 420.26,-79.79"/>
<polygon fill="midnightblue" stroke="midnightblue" points="420.15,-83.3 430.49,-80.97 420.96,-76.35 420.15,-83.3"/>
</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/container/queue/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="432.5,-38.5 432.5,-57.5 517.5,-57.5 517.5,-38.5 432.5,-38.5"/>
<text text-anchor="middle" x="475" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node2&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M391.27,-57.56C401.8,-56.34 412.34,-55.12 422.21,-53.98"/>
<polygon fill="midnightblue" stroke="midnightblue" points="422.68,-57.45 432.21,-52.83 421.87,-50.5 422.68,-57.45"/>
</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/container/queue/push.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="430,-0.5 430,-19.5 520,-19.5 520,-0.5 430,-0.5"/>
<text text-anchor="middle" x="475" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node2&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M368.89,-46.42C391.56,-38.57 416.75,-29.84 436.79,-22.89"/>
<polygon fill="midnightblue" stroke="midnightblue" points="438.16,-26.12 446.47,-19.54 435.87,-19.51 438.16,-26.12"/>
</g>
</g>
</svg>
<g id="navigator" transform="translate(0 0)" fill="#404254">
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
<g id="arrowUp" xlink:href="#dirArrow" transform="translate(30 24)" onmousedown="handlePan(0,-1)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowUp.mouseover" end="arrowUp.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowRight" xlink:href="#dirArrow" transform="rotate(90) translate(36 -43)" onmousedown="handlePan(1,0)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowRight.mouseover" end="arrowRight.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowDown" xlink:href="#dirArrow" transform="rotate(180) translate(-30 -48)" onmousedown="handlePan(0,1)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowDown.mouseover" end="arrowDown.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowLeft" xlink:href="#dirArrow" transform="rotate(270) translate(-36 17)" onmousedown="handlePan(-1,0)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowLeft.mouseover" end="arrowLeft.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
</g>
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
<g id="arrow_out" transform="scale(0.3 0.3)">
<a xlink:href="classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree_a5cf972a2c994a4fa1a89fc77bd5ad503_cgraph_org.svg" target="_base">
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
<path id="arrow"
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
style="fill:#404040;"/>
</a>
</g>
</svg>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,100 @@
<?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.1 (20210923.0004)
-->
<!-- Title: operations_on_datastructures::reverse_binary_tree::BinaryTree::print Pages: 1 -->
<svg width="531pt" height="142pt"
viewBox="0.00 0.00 531.00 142.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 138)">
<title>operations_on_datastructures::reverse_binary_tree::BinaryTree::print</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-138 527,-138 527,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Prints all of the elements in the tree to stdout level&#45;by&#45;level, using the get_level_order() function...">
<polygon fill="#bfbfbf" stroke="black" points="0,-52 0,-82 190,-82 190,-52 0,-52"/>
<text text-anchor="start" x="8" y="-70" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="middle" x="95" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree::print</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../de/dcf/classoperations__on__datastructures_1_1reverse__binary__tree_1_1_binary_tree.html#a2e683b271d8d5cd63e0d09cf8aaa325c" target="_top" xlink:title="Level order traversal of a tree consists of visiting its elements, top to bottom, left to right....">
<polygon fill="white" stroke="black" points="226,-46.5 226,-87.5 391,-87.5 391,-46.5 226,-46.5"/>
<text text-anchor="start" x="234" y="-75.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="start" x="234" y="-64.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree</text>
<text text-anchor="middle" x="308.5" y="-53.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_level_order</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M190.31,-67C198.76,-67 207.32,-67 215.76,-67"/>
<polygon fill="midnightblue" stroke="midnightblue" points="215.97,-70.5 225.97,-67 215.97,-63.5 215.97,-70.5"/>
</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/container/queue/empty.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="427,-114.5 427,-133.5 523,-133.5 523,-114.5 427,-114.5"/>
<text text-anchor="middle" x="475" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M368.89,-87.58C391.56,-95.43 416.75,-104.16 436.79,-111.11"/>
<polygon fill="midnightblue" stroke="midnightblue" points="435.87,-114.49 446.47,-114.46 438.16,-107.88 435.87,-114.49"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="430.5,-76.5 430.5,-95.5 519.5,-95.5 519.5,-76.5 430.5,-76.5"/>
<text text-anchor="middle" x="475" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M391.27,-76.44C401.11,-77.58 410.96,-78.72 420.26,-79.79"/>
<polygon fill="midnightblue" stroke="midnightblue" points="420.15,-83.3 430.49,-80.97 420.96,-76.35 420.15,-83.3"/>
</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/container/queue/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="432.5,-38.5 432.5,-57.5 517.5,-57.5 517.5,-38.5 432.5,-38.5"/>
<text text-anchor="middle" x="475" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node2&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M391.27,-57.56C401.8,-56.34 412.34,-55.12 422.21,-53.98"/>
<polygon fill="midnightblue" stroke="midnightblue" points="422.68,-57.45 432.21,-52.83 421.87,-50.5 422.68,-57.45"/>
</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/container/queue/push.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="430,-0.5 430,-19.5 520,-19.5 520,-0.5 430,-0.5"/>
<text text-anchor="middle" x="475" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node2&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M368.89,-46.42C391.56,-38.57 416.75,-29.84 436.79,-22.89"/>
<polygon fill="midnightblue" stroke="midnightblue" points="438.16,-26.12 446.47,-19.54 435.87,-19.51 438.16,-26.12"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1,3 @@
<map id="operations_on_datastructures::reverse_binary_tree::BinaryTree::insert" name="operations_on_datastructures::reverse_binary_tree::BinaryTree::insert">
<area shape="rect" id="node1" title="inserts a node in the Binary Tree, with the behaviouur of a Binary Search Tree." alt="" coords="5,29,225,85"/>
</map>

View File

@@ -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.1 (20210923.0004)
-->
<!-- Title: operations_on_datastructures::reverse_binary_tree::BinaryTree::insert Pages: 1 -->
<svg width="173pt" height="68pt"
viewBox="0.00 0.00 173.00 68.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 64)">
<title>operations_on_datastructures::reverse_binary_tree::BinaryTree::insert</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-64 169,-64 169,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="inserts a node in the Binary Tree, with the behaviouur of a Binary Search Tree.">
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-41.5 165,-41.5 165,-0.5 0,-0.5"/>
<text text-anchor="start" x="8" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree</text>
<text text-anchor="middle" x="82.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::insert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M52.36,-41.86C49.07,-51.54 59.12,-60 82.5,-60 97.11,-60 106.52,-56.7 110.72,-51.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="114.19,-52.35 112.64,-41.86 107.31,-51.02 114.19,-52.35"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,3 @@
<map id="operations_on_datastructures::reverse_binary_tree::BinaryTree::reverseBinaryTree" name="operations_on_datastructures::reverse_binary_tree::BinaryTree::reverseBinaryTree">
<area shape="rect" id="node1" title="Reverses a Binary Tree recursively by swapping the left and right subtrees and their children." alt="" coords="5,29,225,85"/>
</map>

View File

@@ -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.1 (20210923.0004)
-->
<!-- Title: operations_on_datastructures::reverse_binary_tree::BinaryTree::reverseBinaryTree Pages: 1 -->
<svg width="173pt" height="68pt"
viewBox="0.00 0.00 173.00 68.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 64)">
<title>operations_on_datastructures::reverse_binary_tree::BinaryTree::reverseBinaryTree</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-64 169,-64 169,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Reverses a Binary Tree recursively by swapping the left and right subtrees and their children.">
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-41.5 165,-41.5 165,-0.5 0,-0.5"/>
<text text-anchor="start" x="8" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverse_binary_tree::BinaryTree</text>
<text text-anchor="middle" x="82.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::reverseBinaryTree</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M52.36,-41.86C49.07,-51.54 59.12,-60 82.5,-60 97.11,-60 106.52,-56.7 110.72,-51.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="114.19,-52.35 112.64,-41.86 107.31,-51.02 114.19,-52.35"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB