Documentation for 8b1eab204b

This commit is contained in:
realstealthninja
2024-11-04 12:43:05 +00:00
parent 4fb6e622e9
commit a7bccf7d01
6732 changed files with 153919 additions and 365711 deletions

View File

@@ -1,3 +1,4 @@
<!-- HTML header for doxygen 1.12.0-->
<!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" lang="en-US">
<head>
@@ -5,10 +6,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: data_structures/avltree.cpp File Reference</title>
<title>TheAlgorithms/C++: data_structures/avltree.cpp File Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<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>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
@@ -18,14 +24,24 @@
<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 type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</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>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
@@ -121,11 +138,13 @@ Include dependency graph for avltree.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d7/d2e/avltree_8cpp__incl.svg" width="262" height="111"><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">
</div>
<p><a href="../../d8/dee/avltree_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a74f0cf18a0e5b832d9994e2f2d022287" id="r_a74f0cf18a0e5b832d9994e2f2d022287"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a74f0cf18a0e5b832d9994e2f2d022287">node</a></td></tr>
<tr class="memdesc:a74f0cf18a0e5b832d9994e2f2d022287"><td class="mdescLeft">&#160;</td><td class="mdescRight">for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a> <br /></td></tr>
<tr class="memdesc:a74f0cf18a0e5b832d9994e2f2d022287"><td class="mdescLeft">&#160;</td><td class="mdescRight">for std::queue <br /></td></tr>
<tr class="separator:a74f0cf18a0e5b832d9994e2f2d022287"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
@@ -163,6 +182,8 @@ Functions</h2></td></tr>
<div class="textblock"><p>A simple tree implementation using nodes. </p>
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000002">Todo</a></b></dt><dd>update code to use C++ STL library features and OO structure </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>This program is a poor implementation and does not utilize any of the C++ STL features. </dd></dl>
<p class="definition">Definition in file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a74f0cf18a0e5b832d9994e2f2d022287" name="a74f0cf18a0e5b832d9994e2f2d022287"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74f0cf18a0e5b832d9994e2f2d022287">&#9670;&#160;</a></span>node</h2>
@@ -181,19 +202,20 @@ Functions</h2></td></tr>
<div class="line"> <span class="keyword">struct </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *left;</div>
<div class="line"> <span class="keyword">struct </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *right;</div>
<div class="line">}</div>
<div class="ttc" id="aavltree_8cpp_html_ae4a66d8b0c2b0d626aea45977e358c83"><div class="ttname"><a href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a></div><div class="ttdeci">int height(node *root)</div><div class="ttdef"><b>Definition</b> avltree.cpp:38</div></div>
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition</b> binary_search_tree.cpp:11</div></div>
<div class="ttc" id="aavltree_8cpp_html_ae4a66d8b0c2b0d626aea45977e358c83"><div class="ttname"><a href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a></div><div class="ttdeci">int height(node *root)</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00038">avltree.cpp:38</a></div></div>
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition</b> <a href="../../d3/d26/binary__search__tree_8cpp_source.html#l00011">binary_search_tree.cpp:11</a></div></div>
</div><!-- fragment -->
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a> </p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> </p>
<p>for std::queue </p>
<p>for std::max for std::cout </p>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00013">13</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 13</span> {</div>
<div class="line"><span class="lineno"> 14</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>;</div>
<div class="line"><span class="lineno"> 15</span> <span class="keywordtype">int</span> <a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>;</div>
<div class="line"><span class="lineno"> 16</span> <span class="keyword">struct </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *left;</div>
<div class="line"><span class="lineno"> 17</span> <span class="keyword">struct </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/left.html">right</a>;</div>
<div class="line"><span class="lineno"> 17</span> <span class="keyword">struct </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *right;</div>
<div class="line"><span class="lineno"> 18</span>};</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="aleft_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/left.html">std::right</a></div><div class="ttdeci">T right(T... args)</div></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> <a href="../../d1/df3/hash__search_8cpp_source.html#l00024">hash_search.cpp:24</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -221,6 +243,8 @@ Functions</h2></td></tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>newly created node </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00025">25</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 25</span> {</div>
<div class="line"><span class="lineno"> 26</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *nn = <span class="keyword">new</span> <a class="code hl_typedef" href="#a74f0cf18a0e5b832d9994e2f2d022287">node</a>();</div>
<div class="line"><span class="lineno"> 27</span> nn-&gt;data = <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>;</div>
@@ -229,7 +253,7 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 30</span> nn-&gt;right = <span class="keyword">nullptr</span>;</div>
<div class="line"><span class="lineno"> 31</span> <span class="keywordflow">return</span> nn;</div>
<div class="line"><span class="lineno"> 32</span>}</div>
<div class="ttc" id="aavltree_8cpp_html_a74f0cf18a0e5b832d9994e2f2d022287"><div class="ttname"><a href="#a74f0cf18a0e5b832d9994e2f2d022287">node</a></div><div class="ttdeci">struct node { int data; int height; struct node *left; struct node *right;} node</div><div class="ttdoc">for std::queue</div><div class="ttdef"><b>Definition</b> avltree.cpp:13</div></div>
<div class="ttc" id="aavltree_8cpp_html_a74f0cf18a0e5b832d9994e2f2d022287"><div class="ttname"><a href="#a74f0cf18a0e5b832d9994e2f2d022287">node</a></div><div class="ttdeci">struct node { int data; int height; struct node *left; struct node *right;} node</div><div class="ttdoc">for std::queue</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00013">avltree.cpp:13</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -255,6 +279,8 @@ Functions</h2></td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00151">151</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 151</span> {</div>
<div class="line"><span class="lineno"> 152</span> <span class="keywordflow">if</span> (root) {</div>
<div class="line"><span class="lineno"> 153</span> <a class="code hl_function" href="#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a>(root-&gt;left);</div>
@@ -262,13 +288,8 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 155</span> <span class="keyword">delete</span> root;</div>
<div class="line"><span class="lineno"> 156</span> }</div>
<div class="line"><span class="lineno"> 157</span>}</div>
<div class="ttc" id="aavltree_8cpp_html_a82659e9e223e520cf91d7e55c4a3f88c"><div class="ttname"><a href="#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a></div><div class="ttdeci">void deleteAllNodes(const node *const root)</div><div class="ttdoc">calls delete on every node</div><div class="ttdef"><b>Definition</b> avltree.cpp:151</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="../../d8/dee/avltree_8cpp_a82659e9e223e520cf91d7e55c4a3f88c_cgraph.svg" width="120" height="60"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aavltree_8cpp_html_a82659e9e223e520cf91d7e55c4a3f88c"><div class="ttname"><a href="#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a></div><div class="ttdeci">void deleteAllNodes(const node *const root)</div><div class="ttdoc">calls delete on every node</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00151">avltree.cpp:151</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aa29a7fdc2db1784f5a6e25025ff7cbf5" name="aa29a7fdc2db1784f5a6e25025ff7cbf5"></a>
@@ -299,6 +320,8 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>root of the updated tree </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00122">122</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 122</span> {</div>
<div class="line"><span class="lineno"> 123</span> <span class="keywordflow">if</span> (root == <span class="keyword">nullptr</span>) {</div>
<div class="line"><span class="lineno"> 124</span> <span class="keywordflow">return</span> root;</div>
@@ -323,14 +346,9 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 143</span> <span class="comment">// Balancing Tree after deletion</span></div>
<div class="line"><span class="lineno"> 144</span> <span class="keywordflow">return</span> root;</div>
<div class="line"><span class="lineno"> 145</span>}</div>
<div class="ttc" id="aavltree_8cpp_html_a5fa160a678a34dd51c0aea1c0c00ed5e"><div class="ttname"><a href="#a5fa160a678a34dd51c0aea1c0c00ed5e">minValue</a></div><div class="ttdeci">node * minValue(node *root)</div><div class="ttdef"><b>Definition</b> avltree.cpp:79</div></div>
<div class="ttc" id="aavltree_8cpp_html_aa29a7fdc2db1784f5a6e25025ff7cbf5"><div class="ttname"><a href="#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a></div><div class="ttdeci">node * deleteNode(node *root, int element)</div><div class="ttdoc">removes a given element from AVL tree</div><div class="ttdef"><b>Definition</b> avltree.cpp:122</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="../../d8/dee/avltree_8cpp_aa29a7fdc2db1784f5a6e25025ff7cbf5_cgraph.svg" width="220" height="60"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aavltree_8cpp_html_a5fa160a678a34dd51c0aea1c0c00ed5e"><div class="ttname"><a href="#a5fa160a678a34dd51c0aea1c0c00ed5e">minValue</a></div><div class="ttdeci">node * minValue(node *root)</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00079">avltree.cpp:79</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_aa29a7fdc2db1784f5a6e25025ff7cbf5"><div class="ttname"><a href="#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a></div><div class="ttdeci">node * deleteNode(node *root, int element)</div><div class="ttdoc">removes a given element from AVL tree</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00122">avltree.cpp:122</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aaa457ffec24c9643f2768e7a65e96546" name="aaa457ffec24c9643f2768e7a65e96546"></a>
@@ -354,13 +372,10 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>difference between height of left and right subtree </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 49</span>{ <span class="keywordflow">return</span> <a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;left) - <a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;right); }</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="../../d8/dee/avltree_8cpp_aaa457ffec24c9643f2768e7a65e96546_cgraph.svg" width="322" height="60"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00049">49</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 49</span>{ <span class="keywordflow">return</span> <a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;left) - <a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;right); }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae4a66d8b0c2b0d626aea45977e358c83" name="ae4a66d8b0c2b0d626aea45977e358c83"></a>
@@ -384,19 +399,15 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>height of tree </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00038">38</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 38</span> {</div>
<div class="line"><span class="lineno"> 39</span> <span class="keywordflow">if</span> (root == <span class="keyword">nullptr</span>) {</div>
<div class="line"><span class="lineno"> 40</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 41</span> }</div>
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">return</span> 1 + <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(<a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;left), <a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;right));</div>
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">return</span> 1 + std::max(<a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;left), <a class="code hl_function" href="#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;right));</div>
<div class="line"><span class="lineno"> 43</span>}</div>
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(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="../../d8/dee/avltree_8cpp_ae4a66d8b0c2b0d626aea45977e358c83_cgraph.svg" width="188" height="60"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div><!-- fragment -->
</div>
</div>
<a id="a2473fe7416332495b2678ebe89652e4b" name="a2473fe7416332495b2678ebe89652e4b"></a>
@@ -427,6 +438,8 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>root of the updated tree </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00092">92</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 92</span> {</div>
<div class="line"><span class="lineno"> 93</span> <span class="keywordflow">if</span> (root == <span class="keyword">nullptr</span>) {</div>
<div class="line"><span class="lineno"> 94</span> <span class="keywordflow">return</span> <a class="code hl_function" href="#a48d897353aeb6a721dbc6b6c57e035e6">createNode</a>(item);</div>
@@ -450,17 +463,12 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 112</span> }</div>
<div class="line"><span class="lineno"> 113</span> <span class="keywordflow">return</span> root;</div>
<div class="line"><span class="lineno"> 114</span>}</div>
<div class="ttc" id="aavltree_8cpp_html_a2473fe7416332495b2678ebe89652e4b"><div class="ttname"><a href="#a2473fe7416332495b2678ebe89652e4b">insert</a></div><div class="ttdeci">node * insert(node *root, int item)</div><div class="ttdoc">inserts a new element into AVL tree</div><div class="ttdef"><b>Definition</b> avltree.cpp:92</div></div>
<div class="ttc" id="aavltree_8cpp_html_a473eee1803e4e44a54d685e4b0eef5a6"><div class="ttname"><a href="#a473eee1803e4e44a54d685e4b0eef5a6">leftRotate</a></div><div class="ttdeci">node * leftRotate(node *root)</div><div class="ttdef"><b>Definition</b> avltree.cpp:67</div></div>
<div class="ttc" id="aavltree_8cpp_html_a48d897353aeb6a721dbc6b6c57e035e6"><div class="ttname"><a href="#a48d897353aeb6a721dbc6b6c57e035e6">createNode</a></div><div class="ttdeci">node * createNode(int data)</div><div class="ttdoc">creates and returns a new node</div><div class="ttdef"><b>Definition</b> avltree.cpp:25</div></div>
<div class="ttc" id="aavltree_8cpp_html_aaa457ffec24c9643f2768e7a65e96546"><div class="ttname"><a href="#aaa457ffec24c9643f2768e7a65e96546">getBalance</a></div><div class="ttdeci">int getBalance(node *root)</div><div class="ttdef"><b>Definition</b> avltree.cpp:49</div></div>
<div class="ttc" id="aavltree_8cpp_html_adfc1d482a564c041756719667b955b8c"><div class="ttname"><a href="#adfc1d482a564c041756719667b955b8c">rightRotate</a></div><div class="ttdeci">node * rightRotate(node *root)</div><div class="ttdef"><b>Definition</b> avltree.cpp:55</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="../../d8/dee/avltree_8cpp_a2473fe7416332495b2678ebe89652e4b_cgraph.svg" width="426" height="184"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aavltree_8cpp_html_a2473fe7416332495b2678ebe89652e4b"><div class="ttname"><a href="#a2473fe7416332495b2678ebe89652e4b">insert</a></div><div class="ttdeci">node * insert(node *root, int item)</div><div class="ttdoc">inserts a new element into AVL tree</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00092">avltree.cpp:92</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_a473eee1803e4e44a54d685e4b0eef5a6"><div class="ttname"><a href="#a473eee1803e4e44a54d685e4b0eef5a6">leftRotate</a></div><div class="ttdeci">node * leftRotate(node *root)</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00067">avltree.cpp:67</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_a48d897353aeb6a721dbc6b6c57e035e6"><div class="ttname"><a href="#a48d897353aeb6a721dbc6b6c57e035e6">createNode</a></div><div class="ttdeci">node * createNode(int data)</div><div class="ttdoc">creates and returns a new node</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00025">avltree.cpp:25</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_aaa457ffec24c9643f2768e7a65e96546"><div class="ttname"><a href="#aaa457ffec24c9643f2768e7a65e96546">getBalance</a></div><div class="ttdeci">int getBalance(node *root)</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00049">avltree.cpp:49</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_adfc1d482a564c041756719667b955b8c"><div class="ttname"><a href="#adfc1d482a564c041756719667b955b8c">rightRotate</a></div><div class="ttdeci">node * rightRotate(node *root)</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00055">avltree.cpp:55</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a473eee1803e4e44a54d685e4b0eef5a6" name="a473eee1803e4e44a54d685e4b0eef5a6"></a>
@@ -484,6 +492,8 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>node after left rotation </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00067">67</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 67</span> {</div>
<div class="line"><span class="lineno"> 68</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *t = root-&gt;right;</div>
<div class="line"><span class="lineno"> 69</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *u = t-&gt;left;</div>
@@ -516,12 +526,14 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00163">163</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 163</span> {</div>
<div class="line"><span class="lineno"> 164</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue&lt;node *&gt;</a> q;</div>
<div class="line"><span class="lineno"> 164</span> std::queue&lt;node *&gt; q;</div>
<div class="line"><span class="lineno"> 165</span> q.push(root);</div>
<div class="line"><span class="lineno"> 166</span> <span class="keywordflow">while</span> (!q.empty()) {</div>
<div class="line"><span class="lineno"> 167</span> root = q.front();</div>
<div class="line"><span class="lineno"> 168</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; root-&gt;data &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><span class="lineno"> 168</span> std::cout &lt;&lt; root-&gt;data &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><span class="lineno"> 169</span> q.pop();</div>
<div class="line"><span class="lineno"> 170</span> <span class="keywordflow">if</span> (root-&gt;left) {</div>
<div class="line"><span class="lineno"> 171</span> q.push(root-&gt;left);</div>
@@ -531,8 +543,6 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 175</span> }</div>
<div class="line"><span class="lineno"> 176</span> }</div>
<div class="line"><span class="lineno"> 177</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="aqueue_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -553,29 +563,26 @@ Here is the call graph for this function:</div>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00183">183</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 183</span> {</div>
<div class="line"><span class="lineno"> 184</span> <span class="comment">// Testing AVL Tree</span></div>
<div class="line"><span class="lineno"> 185</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root = <span class="keyword">nullptr</span>;</div>
<div class="line"><span class="lineno"> 186</span> <span class="keywordtype">int</span> i = 0;</div>
<div class="line"><span class="lineno"> 187</span> <span class="keywordflow">for</span> (i = 1; i &lt;= 7; i++) root = <a class="code hl_function" href="#a2473fe7416332495b2678ebe89652e4b">insert</a>(root, i);</div>
<div class="line"><span class="lineno"> 188</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;LevelOrder: &quot;</span>;</div>
<div class="line"><span class="lineno"> 188</span> std::cout &lt;&lt; <span class="stringliteral">&quot;LevelOrder: &quot;</span>;</div>
<div class="line"><span class="lineno"> 189</span> <a class="code hl_function" href="#ae197eb50188fb761346952b9b5f6be59">levelOrder</a>(root);</div>
<div class="line"><span class="lineno"> 190</span> root = <a class="code hl_function" href="#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a>(root, 1); <span class="comment">// Deleting key with value 1</span></div>
<div class="line"><span class="lineno"> 191</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;\nLevelOrder: &quot;</span>;</div>
<div class="line"><span class="lineno"> 191</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\nLevelOrder: &quot;</span>;</div>
<div class="line"><span class="lineno"> 192</span> <a class="code hl_function" href="#ae197eb50188fb761346952b9b5f6be59">levelOrder</a>(root);</div>
<div class="line"><span class="lineno"> 193</span> root = <a class="code hl_function" href="#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a>(root, 4); <span class="comment">// Deletin key with value 4</span></div>
<div class="line"><span class="lineno"> 194</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;\nLevelOrder: &quot;</span>;</div>
<div class="line"><span class="lineno"> 194</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\nLevelOrder: &quot;</span>;</div>
<div class="line"><span class="lineno"> 195</span> <a class="code hl_function" href="#ae197eb50188fb761346952b9b5f6be59">levelOrder</a>(root);</div>
<div class="line"><span class="lineno"> 196</span> <a class="code hl_function" href="#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a>(root);</div>
<div class="line"><span class="lineno"> 197</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 198</span>}</div>
<div class="ttc" id="aavltree_8cpp_html_ae197eb50188fb761346952b9b5f6be59"><div class="ttname"><a href="#ae197eb50188fb761346952b9b5f6be59">levelOrder</a></div><div class="ttdeci">void levelOrder(node *root)</div><div class="ttdoc">prints given tree in the LevelOrder</div><div class="ttdef"><b>Definition</b> avltree.cpp:163</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="../../d8/dee/avltree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="579" height="306"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aavltree_8cpp_html_ae197eb50188fb761346952b9b5f6be59"><div class="ttname"><a href="#ae197eb50188fb761346952b9b5f6be59">levelOrder</a></div><div class="ttdeci">void levelOrder(node *root)</div><div class="ttdoc">prints given tree in the LevelOrder</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00163">avltree.cpp:163</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a5fa160a678a34dd51c0aea1c0c00ed5e" name="a5fa160a678a34dd51c0aea1c0c00ed5e"></a>
@@ -599,18 +606,15 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>node with minimum value in the tree </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00079">79</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 79</span> {</div>
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">if</span> (root-&gt;left == <span class="keyword">nullptr</span>) {</div>
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">return</span> root;</div>
<div class="line"><span class="lineno"> 82</span> }</div>
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">return</span> <a class="code hl_function" href="#a5fa160a678a34dd51c0aea1c0c00ed5e">minValue</a>(root-&gt;left);</div>
<div class="line"><span class="lineno"> 84</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="../../d8/dee/avltree_8cpp_a5fa160a678a34dd51c0aea1c0c00ed5e_cgraph.svg" width="86" height="60"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div><!-- fragment -->
</div>
</div>
<a id="adfc1d482a564c041756719667b955b8c" name="adfc1d482a564c041756719667b955b8c"></a>
@@ -634,6 +638,8 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>node after right rotation </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/dee/avltree_8cpp_source.html#l00055">55</a> of file <a class="el" href="../../d8/dee/avltree_8cpp_source.html">avltree.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 55</span> {</div>
<div class="line"><span class="lineno"> 56</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *t = root-&gt;left;</div>
<div class="line"><span class="lineno"> 57</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *u = t-&gt;right;</div>

View File

@@ -1,17 +0,0 @@
<map id="insert" name="insert">
<area shape="rect" id="Node000001" title="inserts a new element into AVL tree" alt="" coords="5,80,59,106"/>
<area shape="poly" id="edge6_Node000001_Node000001" title=" " alt="" coords="11,81,7,71,9,62,18,56,32,53,47,56,55,63,51,67,45,61,32,59,20,61,14,65,12,71,16,79"/>
<area shape="rect" id="Node000002" href="$d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6" title="creates and returns a new node" alt="" coords="107,5,195,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="50,77,105,40,110,37,113,41,108,44,53,82"/>
<area shape="rect" id="Node000003" href="$d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546" title=" " alt="" coords="108,55,194,80"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="59,85,92,77,93,83,60,90"/>
<area shape="rect" id="Node000006" href="$d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6" title=" " alt="" coords="112,104,190,130"/>
<area shape="poly" id="edge7_Node000001_Node000006" title=" " alt="" coords="60,96,97,103,96,108,59,101"/>
<area shape="rect" id="Node000007" href="$d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c" title=" " alt="" coords="108,153,194,179"/>
<area shape="poly" id="edge8_Node000001_Node000007" title=" " alt="" coords="54,104,108,140,113,143,110,147,105,144,51,108"/>
<area shape="rect" id="Node000004" href="$d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" title=" " alt="" coords="243,55,299,80"/>
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="195,65,227,65,227,70,195,70"/>
<area shape="poly" id="edge4_Node000004_Node000004" title=" " alt="" coords="251,55,248,46,250,37,258,30,271,28,285,31,293,38,289,41,283,36,271,33,260,35,254,40,253,46,256,53"/>
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="347,55,420,80"/>
<area shape="poly" id="edge5_Node000004_Node000005" title=" " alt="" coords="300,65,331,65,331,70,300,70"/>
</map>

View File

@@ -1 +0,0 @@
87c01be2b9e4ed83ed5c49dacda99fe8

View File

@@ -1,173 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: insert Pages: 1 -->
<svg width="319pt" height="138pt"
viewBox="0.00 0.00 318.75 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
<title>insert</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="inserts a new element into AVL tree">
<polygon fill="#999999" stroke="#666666" points="40,-74.25 0,-74.25 0,-55 40,-55 40,-74.25"/>
<text text-anchor="middle" x="20" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">insert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge6_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge6_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M6.05,-74.54C-0.32,-83.15 4.33,-92.25 20,-92.25 28.57,-92.25 33.84,-89.53 35.82,-85.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="39.31,-85.31 34.2,-76.03 32.41,-86.47 39.31,-85.31"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6" target="_top" xlink:title="creates and returns a new node">
<polygon fill="white" stroke="#666666" points="142.25,-130.25 76,-130.25 76,-111 142.25,-111 142.25,-130.25"/>
<text text-anchor="middle" x="109.12" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">createNode</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.77,-74.68C45.76,-82.56 61.62,-93.66 76,-102.62 77.22,-103.39 78.47,-104.15 79.75,-104.92"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="77.89,-107.89 88.3,-109.88 81.4,-101.83 77.89,-107.89"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="141.5,-93.25 76.75,-93.25 76.75,-74 141.5,-74 141.5,-93.25"/>
<text text-anchor="middle" x="109.12" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">getBalance</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M40.34,-68.84C47.81,-70.47 56.68,-72.41 65.49,-74.33"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="64.53,-77.7 75.05,-76.41 66.02,-70.86 64.53,-77.7"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a xlink:href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="138.5,-56.25 79.75,-56.25 79.75,-37 138.5,-37 138.5,-56.25"/>
<text text-anchor="middle" x="109.12" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">leftRotate</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge7_Node000001_Node000006" class="edge">
<title>Node1&#45;&gt;Node6</title>
<g id="a_edge7_Node000001_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M40.34,-60.63C48.62,-58.92 58.63,-56.85 68.37,-54.84"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="69.01,-58.28 78.1,-52.83 67.59,-51.42 69.01,-58.28"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a xlink:href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="141.12,-19.25 77.12,-19.25 77.12,0 141.12,0 141.12,-19.25"/>
<text text-anchor="middle" x="109.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">rightRotate</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge8_Node000001_Node000007" class="edge">
<title>Node1&#45;&gt;Node7</title>
<g id="a_edge8_Node000001_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M35.27,-54.56C46.25,-46.93 61.88,-36.31 76,-27.62 77.23,-26.87 78.48,-26.11 79.76,-25.35"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="81.41,-28.44 88.32,-20.41 77.91,-22.38 81.41,-28.44"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="220.5,-93.25 178.25,-93.25 178.25,-74 220.5,-74 220.5,-93.25"/>
<text text-anchor="middle" x="199.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">height</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M141.99,-83.62C149.92,-83.62 158.43,-83.62 166.37,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="166.32,-87.13 176.32,-83.63 166.32,-80.13 166.32,-87.13"/>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node4 -->
<g id="edge4_Node000004_Node000004" class="edge">
<title>Node4&#45;&gt;Node4</title>
<g id="a_edge4_Node000004_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M186.19,-93.54C180.17,-102.15 184.57,-111.25 199.38,-111.25 207.47,-111.25 212.46,-108.53 214.33,-104.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="217.83,-104.36 212.8,-95.03 210.91,-105.46 217.83,-104.36"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="310.75,-93.25 256.5,-93.25 256.5,-74 310.75,-74 310.75,-93.25"/>
<text text-anchor="middle" x="283.62" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge5_Node000004_Node000005" class="edge">
<title>Node4&#45;&gt;Node5</title>
<g id="a_edge5_Node000004_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M220.71,-83.62C227.95,-83.62 236.36,-83.62 244.6,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="244.49,-87.13 254.49,-83.63 244.49,-80.13 244.49,-87.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -1,147 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: insert Pages: 1 -->
<svg width="319pt" height="138pt"
viewBox="0.00 0.00 318.75 138.25" 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 134.25)">
<title>insert</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="inserts a new element into AVL tree">
<polygon fill="#999999" stroke="#666666" points="40,-74.25 0,-74.25 0,-55 40,-55 40,-74.25"/>
<text text-anchor="middle" x="20" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">insert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge6_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge6_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M6.05,-74.54C-0.32,-83.15 4.33,-92.25 20,-92.25 28.57,-92.25 33.84,-89.53 35.82,-85.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="39.31,-85.31 34.2,-76.03 32.41,-86.47 39.31,-85.31"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6" target="_top" xlink:title="creates and returns a new node">
<polygon fill="white" stroke="#666666" points="142.25,-130.25 76,-130.25 76,-111 142.25,-111 142.25,-130.25"/>
<text text-anchor="middle" x="109.12" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">createNode</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.77,-74.68C45.76,-82.56 61.62,-93.66 76,-102.62 77.22,-103.39 78.47,-104.15 79.75,-104.92"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="77.89,-107.89 88.3,-109.88 81.4,-101.83 77.89,-107.89"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="141.5,-93.25 76.75,-93.25 76.75,-74 141.5,-74 141.5,-93.25"/>
<text text-anchor="middle" x="109.12" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">getBalance</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M40.34,-68.84C47.81,-70.47 56.68,-72.41 65.49,-74.33"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="64.53,-77.7 75.05,-76.41 66.02,-70.86 64.53,-77.7"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a xlink:href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="138.5,-56.25 79.75,-56.25 79.75,-37 138.5,-37 138.5,-56.25"/>
<text text-anchor="middle" x="109.12" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">leftRotate</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge7_Node000001_Node000006" class="edge">
<title>Node1&#45;&gt;Node6</title>
<g id="a_edge7_Node000001_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M40.34,-60.63C48.62,-58.92 58.63,-56.85 68.37,-54.84"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="69.01,-58.28 78.1,-52.83 67.59,-51.42 69.01,-58.28"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a xlink:href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="141.12,-19.25 77.12,-19.25 77.12,0 141.12,0 141.12,-19.25"/>
<text text-anchor="middle" x="109.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">rightRotate</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge8_Node000001_Node000007" class="edge">
<title>Node1&#45;&gt;Node7</title>
<g id="a_edge8_Node000001_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M35.27,-54.56C46.25,-46.93 61.88,-36.31 76,-27.62 77.23,-26.87 78.48,-26.11 79.76,-25.35"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="81.41,-28.44 88.32,-20.41 77.91,-22.38 81.41,-28.44"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="220.5,-93.25 178.25,-93.25 178.25,-74 220.5,-74 220.5,-93.25"/>
<text text-anchor="middle" x="199.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">height</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M141.99,-83.62C149.92,-83.62 158.43,-83.62 166.37,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="166.32,-87.13 176.32,-83.63 166.32,-80.13 166.32,-87.13"/>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node4 -->
<g id="edge4_Node000004_Node000004" class="edge">
<title>Node4&#45;&gt;Node4</title>
<g id="a_edge4_Node000004_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M186.19,-93.54C180.17,-102.15 184.57,-111.25 199.38,-111.25 207.47,-111.25 212.46,-108.53 214.33,-104.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="217.83,-104.36 212.8,-95.03 210.91,-105.46 217.83,-104.36"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="310.75,-93.25 256.5,-93.25 256.5,-74 310.75,-74 310.75,-93.25"/>
<text text-anchor="middle" x="283.62" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge5_Node000004_Node000005" class="edge">
<title>Node4&#45;&gt;Node5</title>
<g id="a_edge5_Node000004_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M220.71,-83.62C227.95,-83.62 236.36,-83.62 244.6,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="244.49,-87.13 254.49,-83.63 244.49,-80.13 244.49,-87.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -1,4 +0,0 @@
<map id="minValue" name="minValue">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,80,55"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="28,29,27,12,33,5,43,3,52,5,58,12,53,15,49,10,42,8,36,10,32,14,34,29"/>
</map>

View File

@@ -1 +0,0 @@
136723d6cc3e9cffb41d0c00edadbc59

View File

@@ -1,56 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: minValue Pages: 1 -->
<svg width="64pt" height="45pt"
viewBox="0.00 0.00 63.75 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>minValue</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="55.75,-19.25 0,-19.25 0,0 55.75,0 55.75,-19.25"/>
<text text-anchor="middle" x="27.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">minValue</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M19.15,-19.54C15.17,-28.15 18.08,-37.25 27.88,-37.25 33.08,-37.25 36.34,-34.68 37.66,-30.98"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="41.15,-30.68 36.74,-21.05 34.18,-31.32 41.15,-30.68"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,30 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: minValue Pages: 1 -->
<svg width="64pt" height="45pt"
viewBox="0.00 0.00 63.75 45.25" 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 41.25)">
<title>minValue</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="55.75,-19.25 0,-19.25 0,0 55.75,0 55.75,-19.25"/>
<text text-anchor="middle" x="27.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">minValue</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M19.15,-19.54C15.17,-28.15 18.08,-37.25 27.88,-37.25 33.08,-37.25 36.34,-34.68 37.66,-30.98"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="41.15,-30.68 36.74,-21.05 34.18,-31.32 41.15,-30.68"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,4 +0,0 @@
<map id="deleteAllNodes" name="deleteAllNodes">
<area shape="rect" id="Node000001" title="calls delete on every node" alt="" coords="5,29,115,55"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="40,30,37,21,39,11,47,5,60,3,74,5,81,12,78,16,72,10,60,8,49,10,44,14,42,20,45,28"/>
</map>

View File

@@ -1 +0,0 @@
7b1fb16cae375f5690e23a870f348033

View File

@@ -1,56 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: deleteAllNodes Pages: 1 -->
<svg width="90pt" height="45pt"
viewBox="0.00 0.00 90.00 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>deleteAllNodes</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="calls delete on every node">
<polygon fill="#999999" stroke="#666666" points="82,-19.25 0,-19.25 0,0 82,0 82,-19.25"/>
<text text-anchor="middle" x="41" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">deleteAllNodes</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M28.16,-19.54C22.31,-28.15 26.59,-37.25 41,-37.25 48.88,-37.25 53.73,-34.53 55.55,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="59.05,-30.38 54.07,-21.03 52.14,-31.45 59.05,-30.38"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,30 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: deleteAllNodes Pages: 1 -->
<svg width="90pt" height="45pt"
viewBox="0.00 0.00 90.00 45.25" 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 41.25)">
<title>deleteAllNodes</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="calls delete on every node">
<polygon fill="#999999" stroke="#666666" points="82,-19.25 0,-19.25 0,0 82,0 82,-19.25"/>
<text text-anchor="middle" x="41" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">deleteAllNodes</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M28.16,-19.54C22.31,-28.15 26.59,-37.25 41,-37.25 48.88,-37.25 53.73,-34.53 55.55,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="59.05,-30.38 54.07,-21.03 52.14,-31.45 59.05,-30.38"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,7 +0,0 @@
<map id="deleteNode" name="deleteNode">
<area shape="rect" id="Node000001" title="removes a given element from AVL tree" alt="" coords="5,29,93,55"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="26,30,22,21,25,11,34,5,49,3,65,5,74,12,70,16,63,10,49,8,36,10,29,14,28,20,31,28"/>
<area shape="rect" id="Node000002" href="$d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e" title=" " alt="" coords="141,29,215,55"/>
<area shape="poly" id="edge2_Node000001_Node000002" title=" " alt="" coords="93,40,125,40,125,45,93,45"/>
<area shape="poly" id="edge3_Node000002_Node000002" title=" " alt="" coords="155,30,151,21,154,11,163,5,178,3,194,5,202,12,199,16,192,10,178,8,165,10,158,14,156,20,160,28"/>
</map>

View File

@@ -1 +0,0 @@
4b993a5e6a95a367d8323df91fbc8161

View File

@@ -1,83 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: deleteNode Pages: 1 -->
<svg width="165pt" height="45pt"
viewBox="0.00 0.00 165.25 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>deleteNode</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="removes a given element from AVL tree">
<polygon fill="#999999" stroke="#666666" points="65.5,-19.25 0,-19.25 0,0 65.5,0 65.5,-19.25"/>
<text text-anchor="middle" x="32.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">deleteNode</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M17.62,-19.54C10.72,-28.15 15.77,-37.25 32.75,-37.25 42.04,-37.25 47.76,-34.53 49.9,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="53.38,-30.24 48.15,-21.03 46.5,-31.49 53.38,-30.24"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="157.25,-19.25 101.5,-19.25 101.5,0 157.25,0 157.25,-19.25"/>
<text text-anchor="middle" x="129.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">minValue</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M65.79,-9.62C73.49,-9.62 81.81,-9.62 89.78,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="89.6,-13.13 99.6,-9.63 89.6,-6.13 89.6,-13.13"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge3_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge3_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M114.25,-19.54C107.35,-28.15 112.39,-37.25 129.38,-37.25 138.66,-37.25 144.38,-34.53 146.53,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="150.01,-30.24 144.77,-21.03 143.12,-31.49 150.01,-30.24"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -1,57 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: deleteNode Pages: 1 -->
<svg width="165pt" height="45pt"
viewBox="0.00 0.00 165.25 45.25" 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 41.25)">
<title>deleteNode</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="removes a given element from AVL tree">
<polygon fill="#999999" stroke="#666666" points="65.5,-19.25 0,-19.25 0,0 65.5,0 65.5,-19.25"/>
<text text-anchor="middle" x="32.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">deleteNode</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M17.62,-19.54C10.72,-28.15 15.77,-37.25 32.75,-37.25 42.04,-37.25 47.76,-34.53 49.9,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="53.38,-30.24 48.15,-21.03 46.5,-31.49 53.38,-30.24"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="157.25,-19.25 101.5,-19.25 101.5,0 157.25,0 157.25,-19.25"/>
<text text-anchor="middle" x="129.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">minValue</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M65.79,-9.62C73.49,-9.62 81.81,-9.62 89.78,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="89.6,-13.13 99.6,-9.63 89.6,-6.13 89.6,-13.13"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge3_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge3_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M114.25,-19.54C107.35,-28.15 112.39,-37.25 129.38,-37.25 138.66,-37.25 144.38,-34.53 146.53,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="150.01,-30.24 144.77,-21.03 143.12,-31.49 150.01,-30.24"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,8 +0,0 @@
<map id="getBalance" name="getBalance">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,92,55"/>
<area shape="rect" id="Node000002" href="$d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" title=" " alt="" coords="140,29,196,55"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="92,40,124,40,124,45,92,45"/>
<area shape="poly" id="edge2_Node000002_Node000002" title=" " alt="" coords="148,30,144,21,146,11,155,5,168,3,182,5,190,12,186,16,180,10,168,8,157,10,151,14,149,20,153,28"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="244,29,316,55"/>
<area shape="poly" id="edge3_Node000002_Node000003" title=" " alt="" coords="196,40,228,40,228,45,196,45"/>
</map>

View File

@@ -1 +0,0 @@
d41ce5d8f2099ea3cf5058b9e9d1ac6b

View File

@@ -1,92 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: getBalance Pages: 1 -->
<svg width="241pt" height="45pt"
viewBox="0.00 0.00 241.25 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>getBalance</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="64.75,-19.25 0,-19.25 0,0 64.75,0 64.75,-19.25"/>
<text text-anchor="middle" x="32.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">getBalance</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="143,-19.25 100.75,-19.25 100.75,0 143,0 143,-19.25"/>
<text text-anchor="middle" x="121.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">height</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M64.96,-9.62C72.83,-9.62 81.27,-9.62 89.14,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="89,-13.13 99,-9.63 89,-6.13 89,-13.13"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge2_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M108.69,-19.54C102.67,-28.15 107.07,-37.25 121.88,-37.25 129.97,-37.25 134.96,-34.53 136.83,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="140.33,-30.36 135.3,-21.03 133.41,-31.46 140.33,-30.36"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="233.25,-19.25 179,-19.25 179,0 233.25,0 233.25,-19.25"/>
<text text-anchor="middle" x="206.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge3_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge3_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M143.21,-9.62C150.45,-9.62 158.86,-9.62 167.1,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="166.99,-13.13 176.99,-9.63 166.99,-6.13 166.99,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -1,66 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: getBalance Pages: 1 -->
<svg width="241pt" height="45pt"
viewBox="0.00 0.00 241.25 45.25" 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 41.25)">
<title>getBalance</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="64.75,-19.25 0,-19.25 0,0 64.75,0 64.75,-19.25"/>
<text text-anchor="middle" x="32.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">getBalance</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="143,-19.25 100.75,-19.25 100.75,0 143,0 143,-19.25"/>
<text text-anchor="middle" x="121.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">height</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M64.96,-9.62C72.83,-9.62 81.27,-9.62 89.14,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="89,-13.13 99,-9.63 89,-6.13 89,-13.13"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge2_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M108.69,-19.54C102.67,-28.15 107.07,-37.25 121.88,-37.25 129.97,-37.25 134.96,-34.53 136.83,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="140.33,-30.36 135.3,-21.03 133.41,-31.46 140.33,-30.36"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="233.25,-19.25 179,-19.25 179,0 233.25,0 233.25,-19.25"/>
<text text-anchor="middle" x="206.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge3_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge3_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M143.21,-9.62C150.45,-9.62 158.86,-9.62 167.1,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="166.99,-13.13 176.99,-9.63 166.99,-6.13 166.99,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -1,6 +0,0 @@
<map id="height" name="height">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,62,55"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="13,30,10,21,12,11,20,5,34,3,48,5,55,12,52,16,45,10,33,8,22,10,17,14,15,20,18,28"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="110,29,182,55"/>
<area shape="poly" id="edge2_Node000001_Node000002" title=" " alt="" coords="62,40,94,40,94,45,62,45"/>
</map>

View File

@@ -1 +0,0 @@
e7cb9a35d598cb4951da940253f6e605

View File

@@ -1,74 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: height Pages: 1 -->
<svg width="141pt" height="45pt"
viewBox="0.00 0.00 140.50 45.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 41.25)">
<title>height</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="42.25,-19.25 0,-19.25 0,0 42.25,0 42.25,-19.25"/>
<text text-anchor="middle" x="21.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">height</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M7.94,-19.54C1.92,-28.15 6.32,-37.25 21.12,-37.25 29.22,-37.25 34.21,-34.53 36.08,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="39.58,-30.36 34.55,-21.03 32.66,-31.46 39.58,-30.36"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="132.5,-19.25 78.25,-19.25 78.25,0 132.5,0 132.5,-19.25"/>
<text text-anchor="middle" x="105.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M42.46,-9.62C49.7,-9.62 58.11,-9.62 66.35,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="66.24,-13.13 76.24,-9.63 66.24,-6.13 66.24,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -1,48 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: height Pages: 1 -->
<svg width="141pt" height="45pt"
viewBox="0.00 0.00 140.50 45.25" 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 41.25)">
<title>height</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="42.25,-19.25 0,-19.25 0,0 42.25,0 42.25,-19.25"/>
<text text-anchor="middle" x="21.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">height</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M7.94,-19.54C1.92,-28.15 6.32,-37.25 21.12,-37.25 29.22,-37.25 34.21,-34.53 36.08,-30.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="39.58,-30.36 34.55,-21.03 32.66,-31.46 39.58,-30.36"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="132.5,-19.25 78.25,-19.25 78.25,0 132.5,0 132.5,-19.25"/>
<text text-anchor="middle" x="105.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M42.46,-9.62C49.7,-9.62 58.11,-9.62 66.35,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="66.24,-13.13 76.24,-9.63 66.24,-6.13 66.24,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,30 +0,0 @@
<map id="main" name="main">
<area shape="rect" id="Node000001" title="Main function." alt="" coords="5,140,55,166"/>
<area shape="rect" id="Node000002" href="$d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c" title="calls delete on every node" alt="" coords="103,29,212,55"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="37,138,63,102,101,64,106,61,109,65,104,68,67,105,42,141"/>
<area shape="rect" id="Node000003" href="$d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5" title="removes a given element from AVL tree" alt="" coords="114,103,201,128"/>
<area shape="poly" id="edge3_Node000001_Node000003" title=" " alt="" coords="54,143,98,130,100,135,56,148"/>
<area shape="rect" id="Node000005" href="$d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b" title="inserts a new element into AVL tree" alt="" coords="131,176,184,202"/>
<area shape="poly" id="edge7_Node000001_Node000005" title=" " alt="" coords="56,157,116,175,115,180,54,162"/>
<area shape="rect" id="Node000012" href="$d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59" title="prints given tree in the LevelOrder" alt="" coords="117,225,198,251"/>
<area shape="poly" id="edge16_Node000001_Node000012" title=" " alt="" coords="46,164,72,188,104,212,111,216,108,220,101,216,69,192,43,168"/>
<area shape="poly" id="edge2_Node000002_Node000002" title=" " alt="" coords="135,30,131,21,133,11,143,5,157,3,173,5,182,12,178,16,171,10,157,8,144,10,138,14,136,20,140,28"/>
<area shape="poly" id="edge4_Node000003_Node000003" title=" " alt="" coords="135,103,131,94,133,85,143,78,157,76,173,79,182,85,178,90,171,84,157,81,144,83,138,88,136,94,140,101"/>
<area shape="rect" id="Node000004" href="$d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e" title=" " alt="" coords="267,77,341,103"/>
<area shape="poly" id="edge5_Node000003_Node000004" title=" " alt="" coords="201,105,251,97,252,102,202,111"/>
<area shape="poly" id="edge6_Node000004_Node000004" title=" " alt="" coords="283,78,279,69,281,59,290,53,304,51,319,53,327,60,324,64,317,58,304,56,292,58,286,62,284,68,288,76"/>
<area shape="poly" id="edge13_Node000005_Node000005" title=" " alt="" coords="135,177,131,167,133,158,143,152,157,149,173,152,182,159,178,163,171,157,157,155,144,157,138,161,136,167,140,175"/>
<area shape="rect" id="Node000006" href="$d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6" title="creates and returns a new node" alt="" coords="260,127,348,152"/>
<area shape="poly" id="edge8_Node000005_Node000006" title=" " alt="" coords="184,177,249,155,250,160,185,183"/>
<area shape="rect" id="Node000007" href="$d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546" title=" " alt="" coords="261,176,347,202"/>
<area shape="poly" id="edge9_Node000005_Node000007" title=" " alt="" coords="184,186,246,186,246,192,184,192"/>
<area shape="rect" id="Node000010" href="$d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6" title=" " alt="" coords="265,225,343,251"/>
<area shape="poly" id="edge14_Node000005_Node000010" title=" " alt="" coords="185,195,251,218,250,223,184,200"/>
<area shape="rect" id="Node000011" href="$d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c" title=" " alt="" coords="262,275,347,300"/>
<area shape="poly" id="edge15_Node000005_Node000011" title=" " alt="" coords="185,196,214,211,229,224,238,236,262,262,265,264,262,268,258,265,234,239,225,227,210,215,183,200"/>
<area shape="rect" id="Node000008" href="$d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" title=" " alt="" coords="396,176,453,202"/>
<area shape="poly" id="edge10_Node000007_Node000008" title=" " alt="" coords="348,186,380,186,380,192,348,192"/>
<area shape="poly" id="edge11_Node000008_Node000008" title=" " alt="" coords="404,177,401,167,403,158,411,152,425,149,439,152,446,159,443,163,436,157,424,155,413,157,408,161,406,167,409,175"/>
<area shape="rect" id="Node000009" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="501,176,573,202"/>
<area shape="poly" id="edge12_Node000008_Node000009" title=" " alt="" coords="453,186,485,186,485,192,453,192"/>
</map>

View File

@@ -1 +0,0 @@
d5008e294354a113954942af42e9314b

View File

@@ -1,290 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: main Pages: 1 -->
<svg width="434pt" height="229pt"
viewBox="0.00 0.00 433.75 229.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 225.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Main function.">
<polygon fill="#999999" stroke="#666666" points="37,-120.25 0,-120.25 0,-101 37,-101 37,-120.25"/>
<text text-anchor="middle" x="18.5" y="-106.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c" target="_top" xlink:title="calls delete on every node">
<polygon fill="white" stroke="#666666" points="155,-203.25 73,-203.25 73,-184 155,-184 155,-203.25"/>
<text text-anchor="middle" x="114" y="-189.75" font-family="Helvetica,sans-Serif" font-size="10.00">deleteAllNodes</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M25.62,-120.65C34.54,-134.57 52.33,-159.83 73,-175.62 74.12,-176.48 75.29,-177.31 76.5,-178.11"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="74.47,-180.98 84.89,-182.89 77.93,-174.9 74.47,-180.98"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5" target="_top" xlink:title="removes a given element from AVL tree">
<polygon fill="white" stroke="#666666" points="146.75,-148.25 81.25,-148.25 81.25,-129 146.75,-129 146.75,-148.25"/>
<text text-anchor="middle" x="114" y="-134.75" font-family="Helvetica,sans-Serif" font-size="10.00">deleteNode</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge3_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge3_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.09,-115.89C46.47,-118.7 58.46,-122.29 70.12,-125.78"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="69.08,-129.13 79.66,-128.64 71.09,-122.42 69.08,-129.13"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b" target="_top" xlink:title="inserts a new element into AVL tree">
<polygon fill="white" stroke="#666666" points="134,-93.25 94,-93.25 94,-74 134,-74 134,-93.25"/>
<text text-anchor="middle" x="114" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">insert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge7_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge7_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.09,-105.55C49.9,-101.85 67.58,-96.74 82.66,-92.39"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="83.47,-95.8 92.1,-89.66 81.52,-89.07 83.47,-95.8"/>
</a>
</g>
</g>
<!-- Node12 -->
<g id="Node000012" class="node">
<title>Node12</title>
<g id="a_Node000012"><a xlink:href="../../d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59" target="_top" xlink:title="prints given tree in the LevelOrder">
<polygon fill="white" stroke="#666666" points="144.12,-56.25 83.88,-56.25 83.88,-37 144.12,-37 144.12,-56.25"/>
<text text-anchor="middle" x="114" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">levelOrder</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node12 -->
<g id="edge16_Node000001_Node000012" class="edge">
<title>Node1&#45;&gt;Node12</title>
<g id="a_edge16_Node000001_Node000012"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M29.45,-100.51C39.7,-90.48 56.46,-75.14 73,-64.62 74.59,-63.61 76.25,-62.63 77.94,-61.68"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="79.22,-64.95 86.53,-57.28 76.04,-58.72 79.22,-64.95"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge2_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M99.05,-203.54C92.23,-212.15 97.21,-221.25 114,-221.25 123.18,-221.25 128.83,-218.53 130.95,-214.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.44,-214.25 129.22,-205.03 127.55,-215.49 134.44,-214.25"/>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node3 -->
<g id="edge4_Node000003_Node000003" class="edge">
<title>Node3&#45;&gt;Node3</title>
<g id="a_edge4_Node000003_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M99.05,-148.54C92.23,-157.15 97.21,-166.25 114,-166.25 123.18,-166.25 128.83,-163.53 130.95,-159.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.44,-159.25 129.22,-150.03 127.55,-160.49 134.44,-159.25"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="252,-167.25 196.25,-167.25 196.25,-148 252,-148 252,-167.25"/>
<text text-anchor="middle" x="224.12" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">minValue</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge5_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge5_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M147.15,-144.27C158.94,-146.35 172.41,-148.71 184.7,-150.87"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="184.08,-154.32 194.54,-152.6 185.29,-147.42 184.08,-154.32"/>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node4 -->
<g id="edge6_Node000004_Node000004" class="edge">
<title>Node4&#45;&gt;Node4</title>
<g id="a_edge6_Node000004_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M210,-167.54C203.55,-176.15 208.26,-185.25 224.12,-185.25 232.8,-185.25 238.14,-182.53 240.14,-178.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="243.64,-178.3 238.51,-169.03 236.73,-179.48 243.64,-178.3"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node5 -->
<g id="edge13_Node000005_Node000005" class="edge">
<title>Node5&#45;&gt;Node5</title>
<g id="a_edge13_Node000005_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M99.05,-93.54C92.23,-102.15 97.21,-111.25 114,-111.25 123.18,-111.25 128.83,-108.53 130.95,-104.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.44,-104.25 129.22,-95.03 127.55,-105.49 134.44,-104.25"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a xlink:href="../../d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6" target="_top" xlink:title="creates and returns a new node">
<polygon fill="white" stroke="#666666" points="257.25,-130.25 191,-130.25 191,-111 257.25,-111 257.25,-130.25"/>
<text text-anchor="middle" x="224.12" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">createNode</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge8_Node000005_Node000006" class="edge">
<title>Node5&#45;&gt;Node6</title>
<g id="a_edge8_Node000005_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M134.33,-90.24C147.88,-94.88 166.49,-101.24 183.17,-106.95"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="181.75,-110.17 192.34,-110.09 184.02,-103.54 181.75,-110.17"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a xlink:href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="256.5,-93.25 191.75,-93.25 191.75,-74 256.5,-74 256.5,-93.25"/>
<text text-anchor="middle" x="224.12" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">getBalance</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node7 -->
<g id="edge9_Node000005_Node000007" class="edge">
<title>Node5&#45;&gt;Node7</title>
<g id="a_edge9_Node000005_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M134.33,-83.62C147.14,-83.62 164.45,-83.62 180.39,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="180.16,-87.13 190.16,-83.63 180.16,-80.13 180.16,-87.13"/>
</a>
</g>
</g>
<!-- Node10 -->
<g id="Node000010" class="node">
<title>Node10</title>
<g id="a_Node000010"><a xlink:href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="253.5,-56.25 194.75,-56.25 194.75,-37 253.5,-37 253.5,-56.25"/>
<text text-anchor="middle" x="224.12" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">leftRotate</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node10 -->
<g id="edge14_Node000005_Node000010" class="edge">
<title>Node5&#45;&gt;Node10</title>
<g id="a_edge14_Node000005_Node000010"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M134.33,-77.01C148.08,-72.3 167.04,-65.82 183.9,-60.05"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="184.85,-63.42 193.17,-56.87 182.58,-56.8 184.85,-63.42"/>
</a>
</g>
</g>
<!-- Node11 -->
<g id="Node000011" class="node">
<title>Node11</title>
<g id="a_Node000011"><a xlink:href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="256.12,-19.25 192.12,-19.25 192.12,0 256.12,0 256.12,-19.25"/>
<text text-anchor="middle" x="224.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">rightRotate</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node11 -->
<g id="edge15_Node000005_Node000011" class="edge">
<title>Node5&#45;&gt;Node11</title>
<g id="a_edge15_Node000005_Node000011"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M134.14,-76.8C141.03,-73.89 148.67,-70.12 155,-65.62 173.97,-52.15 172.64,-41.92 191,-27.62 191.82,-26.99 192.66,-26.36 193.52,-25.74"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="195.35,-28.73 201.89,-20.39 191.58,-22.83 195.35,-28.73"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a xlink:href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="335.5,-93.25 293.25,-93.25 293.25,-74 335.5,-74 335.5,-93.25"/>
<text text-anchor="middle" x="314.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">height</text>
</a>
</g>
</g>
<!-- Node7&#45;&gt;Node8 -->
<g id="edge10_Node000007_Node000008" class="edge">
<title>Node7&#45;&gt;Node8</title>
<g id="a_edge10_Node000007_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M256.99,-83.62C264.92,-83.62 273.43,-83.62 281.37,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="281.32,-87.13 291.32,-83.63 281.32,-80.13 281.32,-87.13"/>
</a>
</g>
</g>
<!-- Node8&#45;&gt;Node8 -->
<g id="edge11_Node000008_Node000008" class="edge">
<title>Node8&#45;&gt;Node8</title>
<g id="a_edge11_Node000008_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M301.19,-93.54C295.17,-102.15 299.57,-111.25 314.38,-111.25 322.47,-111.25 327.46,-108.53 329.33,-104.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="332.83,-104.36 327.8,-95.03 325.91,-105.46 332.83,-104.36"/>
</a>
</g>
</g>
<!-- Node9 -->
<g id="Node000009" class="node">
<title>Node9</title>
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="425.75,-93.25 371.5,-93.25 371.5,-74 425.75,-74 425.75,-93.25"/>
<text text-anchor="middle" x="398.62" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node8&#45;&gt;Node9 -->
<g id="edge12_Node000008_Node000009" class="edge">
<title>Node8&#45;&gt;Node9</title>
<g id="a_edge12_Node000008_Node000009"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M335.71,-83.62C342.95,-83.62 351.36,-83.62 359.6,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="359.49,-87.13 369.49,-83.63 359.49,-80.13 359.49,-87.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,264 +0,0 @@
<?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 12.1.2 (20240928.0832)
-->
<!-- Title: main Pages: 1 -->
<svg width="434pt" height="229pt"
viewBox="0.00 0.00 433.75 229.25" 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 225.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Main function.">
<polygon fill="#999999" stroke="#666666" points="37,-120.25 0,-120.25 0,-101 37,-101 37,-120.25"/>
<text text-anchor="middle" x="18.5" y="-106.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c" target="_top" xlink:title="calls delete on every node">
<polygon fill="white" stroke="#666666" points="155,-203.25 73,-203.25 73,-184 155,-184 155,-203.25"/>
<text text-anchor="middle" x="114" y="-189.75" font-family="Helvetica,sans-Serif" font-size="10.00">deleteAllNodes</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M25.62,-120.65C34.54,-134.57 52.33,-159.83 73,-175.62 74.12,-176.48 75.29,-177.31 76.5,-178.11"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="74.47,-180.98 84.89,-182.89 77.93,-174.9 74.47,-180.98"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5" target="_top" xlink:title="removes a given element from AVL tree">
<polygon fill="white" stroke="#666666" points="146.75,-148.25 81.25,-148.25 81.25,-129 146.75,-129 146.75,-148.25"/>
<text text-anchor="middle" x="114" y="-134.75" font-family="Helvetica,sans-Serif" font-size="10.00">deleteNode</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge3_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge3_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.09,-115.89C46.47,-118.7 58.46,-122.29 70.12,-125.78"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="69.08,-129.13 79.66,-128.64 71.09,-122.42 69.08,-129.13"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b" target="_top" xlink:title="inserts a new element into AVL tree">
<polygon fill="white" stroke="#666666" points="134,-93.25 94,-93.25 94,-74 134,-74 134,-93.25"/>
<text text-anchor="middle" x="114" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">insert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge7_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge7_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.09,-105.55C49.9,-101.85 67.58,-96.74 82.66,-92.39"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="83.47,-95.8 92.1,-89.66 81.52,-89.07 83.47,-95.8"/>
</a>
</g>
</g>
<!-- Node12 -->
<g id="Node000012" class="node">
<title>Node12</title>
<g id="a_Node000012"><a xlink:href="../../d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59" target="_top" xlink:title="prints given tree in the LevelOrder">
<polygon fill="white" stroke="#666666" points="144.12,-56.25 83.88,-56.25 83.88,-37 144.12,-37 144.12,-56.25"/>
<text text-anchor="middle" x="114" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">levelOrder</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node12 -->
<g id="edge16_Node000001_Node000012" class="edge">
<title>Node1&#45;&gt;Node12</title>
<g id="a_edge16_Node000001_Node000012"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M29.45,-100.51C39.7,-90.48 56.46,-75.14 73,-64.62 74.59,-63.61 76.25,-62.63 77.94,-61.68"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="79.22,-64.95 86.53,-57.28 76.04,-58.72 79.22,-64.95"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge2_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M99.05,-203.54C92.23,-212.15 97.21,-221.25 114,-221.25 123.18,-221.25 128.83,-218.53 130.95,-214.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.44,-214.25 129.22,-205.03 127.55,-215.49 134.44,-214.25"/>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node3 -->
<g id="edge4_Node000003_Node000003" class="edge">
<title>Node3&#45;&gt;Node3</title>
<g id="a_edge4_Node000003_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M99.05,-148.54C92.23,-157.15 97.21,-166.25 114,-166.25 123.18,-166.25 128.83,-163.53 130.95,-159.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.44,-159.25 129.22,-150.03 127.55,-160.49 134.44,-159.25"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="252,-167.25 196.25,-167.25 196.25,-148 252,-148 252,-167.25"/>
<text text-anchor="middle" x="224.12" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">minValue</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge5_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge5_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M147.15,-144.27C158.94,-146.35 172.41,-148.71 184.7,-150.87"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="184.08,-154.32 194.54,-152.6 185.29,-147.42 184.08,-154.32"/>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node4 -->
<g id="edge6_Node000004_Node000004" class="edge">
<title>Node4&#45;&gt;Node4</title>
<g id="a_edge6_Node000004_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M210,-167.54C203.55,-176.15 208.26,-185.25 224.12,-185.25 232.8,-185.25 238.14,-182.53 240.14,-178.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="243.64,-178.3 238.51,-169.03 236.73,-179.48 243.64,-178.3"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node5 -->
<g id="edge13_Node000005_Node000005" class="edge">
<title>Node5&#45;&gt;Node5</title>
<g id="a_edge13_Node000005_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M99.05,-93.54C92.23,-102.15 97.21,-111.25 114,-111.25 123.18,-111.25 128.83,-108.53 130.95,-104.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.44,-104.25 129.22,-95.03 127.55,-105.49 134.44,-104.25"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a xlink:href="../../d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6" target="_top" xlink:title="creates and returns a new node">
<polygon fill="white" stroke="#666666" points="257.25,-130.25 191,-130.25 191,-111 257.25,-111 257.25,-130.25"/>
<text text-anchor="middle" x="224.12" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">createNode</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge8_Node000005_Node000006" class="edge">
<title>Node5&#45;&gt;Node6</title>
<g id="a_edge8_Node000005_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M134.33,-90.24C147.88,-94.88 166.49,-101.24 183.17,-106.95"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="181.75,-110.17 192.34,-110.09 184.02,-103.54 181.75,-110.17"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a xlink:href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="256.5,-93.25 191.75,-93.25 191.75,-74 256.5,-74 256.5,-93.25"/>
<text text-anchor="middle" x="224.12" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">getBalance</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node7 -->
<g id="edge9_Node000005_Node000007" class="edge">
<title>Node5&#45;&gt;Node7</title>
<g id="a_edge9_Node000005_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M134.33,-83.62C147.14,-83.62 164.45,-83.62 180.39,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="180.16,-87.13 190.16,-83.63 180.16,-80.13 180.16,-87.13"/>
</a>
</g>
</g>
<!-- Node10 -->
<g id="Node000010" class="node">
<title>Node10</title>
<g id="a_Node000010"><a xlink:href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="253.5,-56.25 194.75,-56.25 194.75,-37 253.5,-37 253.5,-56.25"/>
<text text-anchor="middle" x="224.12" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">leftRotate</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node10 -->
<g id="edge14_Node000005_Node000010" class="edge">
<title>Node5&#45;&gt;Node10</title>
<g id="a_edge14_Node000005_Node000010"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M134.33,-77.01C148.08,-72.3 167.04,-65.82 183.9,-60.05"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="184.85,-63.42 193.17,-56.87 182.58,-56.8 184.85,-63.42"/>
</a>
</g>
</g>
<!-- Node11 -->
<g id="Node000011" class="node">
<title>Node11</title>
<g id="a_Node000011"><a xlink:href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="256.12,-19.25 192.12,-19.25 192.12,0 256.12,0 256.12,-19.25"/>
<text text-anchor="middle" x="224.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">rightRotate</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node11 -->
<g id="edge15_Node000005_Node000011" class="edge">
<title>Node5&#45;&gt;Node11</title>
<g id="a_edge15_Node000005_Node000011"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M134.14,-76.8C141.03,-73.89 148.67,-70.12 155,-65.62 173.97,-52.15 172.64,-41.92 191,-27.62 191.82,-26.99 192.66,-26.36 193.52,-25.74"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="195.35,-28.73 201.89,-20.39 191.58,-22.83 195.35,-28.73"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a xlink:href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="335.5,-93.25 293.25,-93.25 293.25,-74 335.5,-74 335.5,-93.25"/>
<text text-anchor="middle" x="314.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">height</text>
</a>
</g>
</g>
<!-- Node7&#45;&gt;Node8 -->
<g id="edge10_Node000007_Node000008" class="edge">
<title>Node7&#45;&gt;Node8</title>
<g id="a_edge10_Node000007_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M256.99,-83.62C264.92,-83.62 273.43,-83.62 281.37,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="281.32,-87.13 291.32,-83.63 281.32,-80.13 281.32,-87.13"/>
</a>
</g>
</g>
<!-- Node8&#45;&gt;Node8 -->
<g id="edge11_Node000008_Node000008" class="edge">
<title>Node8&#45;&gt;Node8</title>
<g id="a_edge11_Node000008_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M301.19,-93.54C295.17,-102.15 299.57,-111.25 314.38,-111.25 322.47,-111.25 327.46,-108.53 329.33,-104.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="332.83,-104.36 327.8,-95.03 325.91,-105.46 332.83,-104.36"/>
</a>
</g>
</g>
<!-- Node9 -->
<g id="Node000009" class="node">
<title>Node9</title>
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="425.75,-93.25 371.5,-93.25 371.5,-74 425.75,-74 425.75,-93.25"/>
<text text-anchor="middle" x="398.62" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node8&#45;&gt;Node9 -->
<g id="edge12_Node000008_Node000009" class="edge">
<title>Node8&#45;&gt;Node9</title>
<g id="a_edge12_Node000008_Node000009"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M335.71,-83.62C342.95,-83.62 351.36,-83.62 359.6,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="359.49,-87.13 369.49,-83.63 359.49,-80.13 359.49,-87.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,315 @@
<!-- HTML header for doxygen 1.12.0-->
<!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" lang="en-US">
<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.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TheAlgorithms/C++: data_structures/avltree.cpp Source File</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<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>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.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/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.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 id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @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',true);
$(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 */
$(function(){initNavTree('d8/dee/avltree_8cpp_source.html','../../'); initResizable(true); });
/* @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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">avltree.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d8/dee/avltree_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include &lt;algorithm&gt;</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &lt;iostream&gt;</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include &lt;queue&gt;</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="foldopen" id="foldopen00013" data-start="{" data-end="};">
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287"> 13</a></span><span class="keyword">using </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> = <span class="keyword">struct </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordtype">int</span> data;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83">height</a>;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">struct </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *left;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">struct </span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *right;</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>};</div>
</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="foldopen" id="foldopen00025" data-start="{" data-end="}">
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6"> 25</a></span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6">createNode</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>) {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *nn = <span class="keyword">new</span> <a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>();</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> nn-&gt;data = <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> nn-&gt;height = 0;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> nn-&gt;left = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> nn-&gt;right = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">return</span> nn;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>}</div>
</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="foldopen" id="foldopen00038" data-start="{" data-end="}">
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83"> 38</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root) {</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">if</span> (root == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> }</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span> 1 + std::max(<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;left), <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;right));</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546"> 49</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546">getBalance</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root) { <span class="keywordflow">return</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;left) - <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83">height</a>(root-&gt;right); }</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="foldopen" id="foldopen00055" data-start="{" data-end="}">
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c"> 55</a></span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c">rightRotate</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root) {</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *t = root-&gt;left;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *u = t-&gt;right;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> t-&gt;right = root;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> root-&gt;left = u;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">return</span> t;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>}</div>
</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="foldopen" id="foldopen00067" data-start="{" data-end="}">
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6"> 67</a></span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6">leftRotate</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root) {</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *t = root-&gt;right;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *u = t-&gt;left;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> t-&gt;left = root;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> root-&gt;right = u;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">return</span> t;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span>}</div>
</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="foldopen" id="foldopen00079" data-start="{" data-end="}">
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e"> 79</a></span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e">minValue</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root) {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">if</span> (root-&gt;left == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">return</span> root;</div>
<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">return</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e">minValue</a>(root-&gt;left);</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>}</div>
</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
<div class="foldopen" id="foldopen00092" data-start="{" data-end="}">
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b"> 92</a></span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b">insert</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root, <span class="keywordtype">int</span> item) {</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">if</span> (root == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6">createNode</a>(item);</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> }</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">if</span> (item &lt; root-&gt;<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>) {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> root-&gt;left = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b">insert</a>(root-&gt;left, item);</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> root-&gt;right = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b">insert</a>(root-&gt;right, item);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> }</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordtype">int</span> b = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546">getBalance</a>(root);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">if</span> (b &gt; 1) {</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546">getBalance</a>(root-&gt;left) &lt; 0) {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> root-&gt;left = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6">leftRotate</a>(root-&gt;left); <span class="comment">// Left-Right Case</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c">rightRotate</a>(root); <span class="comment">// Left-Left Case</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (b &lt; -1) {</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546">getBalance</a>(root-&gt;right) &gt; 0) {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> root-&gt;right = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c">rightRotate</a>(root-&gt;right); <span class="comment">// Right-Left Case</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> }</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6">leftRotate</a>(root); <span class="comment">// Right-Right Case</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> }</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">return</span> root;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span>}</div>
</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="foldopen" id="foldopen00122" data-start="{" data-end="}">
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5"> 122</a></span><a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *<a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root, <span class="keywordtype">int</span> element) {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">if</span> (root == <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> root;</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> <span class="keywordflow">if</span> (element &lt; root-&gt;<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>) {</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> root-&gt;left = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a>(root-&gt;left, element);</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (element &gt; root-&gt;data) {</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> root-&gt;right = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a>(root-&gt;right, element);</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> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="comment">// Node to be deleted is leaf node or have only one Child</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">if</span> (!root-&gt;right || !root-&gt;left) {</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *temp = !root-&gt;right ? root-&gt;left : root-&gt;right;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keyword">delete</span> root;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">return</span> temp;</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">// Node to be deleted have both left and right subtrees</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *temp = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e">minValue</a>(root-&gt;right);</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> root-&gt;data = temp-&gt;data;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> root-&gt;right = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a>(root-&gt;right, temp-&gt;data);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> }</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// Balancing Tree after deletion</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">return</span> root;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span>}</div>
</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="foldopen" id="foldopen00151" data-start="{" data-end="}">
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c"> 151</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a>(<span class="keyword">const</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *<span class="keyword">const</span> root) {</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">if</span> (root) {</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a>(root-&gt;left);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a>(root-&gt;right);</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">delete</span> root;</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>}</div>
</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
<div class="foldopen" id="foldopen00163" data-start="{" data-end="}">
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59"> 163</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59">levelOrder</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root) {</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> std::queue&lt;node *&gt; q;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> q.push(root);</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">while</span> (!q.empty()) {</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> root = q.front();</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> std::cout &lt;&lt; root-&gt;data &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> q.pop();</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">if</span> (root-&gt;left) {</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> q.push(root-&gt;left);</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> }</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keywordflow">if</span> (root-&gt;right) {</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> q.push(root-&gt;right);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> }</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> }</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span>}</div>
</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> </div>
<div class="foldopen" id="foldopen00183" data-start="{" data-end="}">
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"><a class="line" href="../../d8/dee/avltree_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 183</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="comment">// Testing AVL Tree</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *root = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordtype">int</span> i = 0;</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">for</span> (i = 1; i &lt;= 7; i++) root = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b">insert</a>(root, i);</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> std::cout &lt;&lt; <span class="stringliteral">&quot;LevelOrder: &quot;</span>;</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59">levelOrder</a>(root);</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> root = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a>(root, 1); <span class="comment">// Deleting key with value 1</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\nLevelOrder: &quot;</span>;</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59">levelOrder</a>(root);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> root = <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a>(root, 4); <span class="comment">// Deletin key with value 4</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> std::cout &lt;&lt; <span class="stringliteral">&quot;\nLevelOrder: &quot;</span>;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59">levelOrder</a>(root);</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <a class="code hl_function" href="../../d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a>(root);</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span>}</div>
</div>
<div class="ttc" id="aavltree_8cpp_html_a2473fe7416332495b2678ebe89652e4b"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b">insert</a></div><div class="ttdeci">node * insert(node *root, int item)</div><div class="ttdoc">inserts a new element into AVL tree</div><div class="ttdef"><b>Definition</b> <a href="#l00092">avltree.cpp:92</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_a473eee1803e4e44a54d685e4b0eef5a6"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a473eee1803e4e44a54d685e4b0eef5a6">leftRotate</a></div><div class="ttdeci">node * leftRotate(node *root)</div><div class="ttdef"><b>Definition</b> <a href="#l00067">avltree.cpp:67</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_a48d897353aeb6a721dbc6b6c57e035e6"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a48d897353aeb6a721dbc6b6c57e035e6">createNode</a></div><div class="ttdeci">node * createNode(int data)</div><div class="ttdoc">creates and returns a new node</div><div class="ttdef"><b>Definition</b> <a href="#l00025">avltree.cpp:25</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_a5fa160a678a34dd51c0aea1c0c00ed5e"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a5fa160a678a34dd51c0aea1c0c00ed5e">minValue</a></div><div class="ttdeci">node * minValue(node *root)</div><div class="ttdef"><b>Definition</b> <a href="#l00079">avltree.cpp:79</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_a74f0cf18a0e5b832d9994e2f2d022287"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a></div><div class="ttdeci">struct node { int data; int height; struct node *left; struct node *right;} node</div><div class="ttdoc">for std::queue</div><div class="ttdef"><b>Definition</b> <a href="#l00013">avltree.cpp:13</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_a82659e9e223e520cf91d7e55c4a3f88c"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a82659e9e223e520cf91d7e55c4a3f88c">deleteAllNodes</a></div><div class="ttdeci">void deleteAllNodes(const node *const root)</div><div class="ttdoc">calls delete on every node</div><div class="ttdef"><b>Definition</b> <a href="#l00151">avltree.cpp:151</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_aa29a7fdc2db1784f5a6e25025ff7cbf5"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#aa29a7fdc2db1784f5a6e25025ff7cbf5">deleteNode</a></div><div class="ttdeci">node * deleteNode(node *root, int element)</div><div class="ttdoc">removes a given element from AVL tree</div><div class="ttdef"><b>Definition</b> <a href="#l00122">avltree.cpp:122</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_aaa457ffec24c9643f2768e7a65e96546"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#aaa457ffec24c9643f2768e7a65e96546">getBalance</a></div><div class="ttdeci">int getBalance(node *root)</div><div class="ttdef"><b>Definition</b> <a href="#l00049">avltree.cpp:49</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_adfc1d482a564c041756719667b955b8c"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#adfc1d482a564c041756719667b955b8c">rightRotate</a></div><div class="ttdeci">node * rightRotate(node *root)</div><div class="ttdef"><b>Definition</b> <a href="#l00055">avltree.cpp:55</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_ae197eb50188fb761346952b9b5f6be59"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#ae197eb50188fb761346952b9b5f6be59">levelOrder</a></div><div class="ttdeci">void levelOrder(node *root)</div><div class="ttdoc">prints given tree in the LevelOrder</div><div class="ttdef"><b>Definition</b> <a href="#l00163">avltree.cpp:163</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_ae4a66d8b0c2b0d626aea45977e358c83"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#ae4a66d8b0c2b0d626aea45977e358c83">height</a></div><div class="ttdeci">int height(node *root)</div><div class="ttdef"><b>Definition</b> <a href="#l00038">avltree.cpp:38</a></div></div>
<div class="ttc" id="aavltree_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="#l00183">avltree.cpp:183</a></div></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> <a href="../../d1/df3/hash__search_8cpp_source.html#l00024">hash_search.cpp:24</a></div></div>
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition</b> <a href="../../d3/d26/binary__search__tree_8cpp_source.html#l00011">binary_search_tree.cpp:11</a></div></div>
</div><!-- fragment --></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="../../d8/dee/avltree_8cpp.html">avltree.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.12.0 </li>
</ul>
</div>
</body>
</html>