mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-31 01:02:46 +08:00
Documentation for 652c2d2650
This commit is contained in:
@@ -152,7 +152,7 @@ Functions</h2></td></tr>
|
||||
<p>two elements a[i] and a[j] form an inversion if <code>a[i]</code> > <code>a[j]</code> and i < j</p>
|
||||
<p>Time Complexity --> <code>O(n.log n)</code></p>
|
||||
<p>Space Complexity --> <code>O(n)</code> ; additional array <code>temp[1..n]</code> </p>
|
||||
<h3><a class="anchor" id="autotoc_md87"></a>
|
||||
<h3><a class="anchor" id="autotoc_md91"></a>
|
||||
Algorithm</h3>
|
||||
<ol type="1">
|
||||
<li>The idea is similar to merge sort, divide the array into two equal or almost equal halves in each step until the base case is reached.</li>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<map id="operations_on_datastructures::inorder_traversal_of_bst::Node" name="operations_on_datastructures::inorder_traversal_of_bst::Node">
|
||||
<area shape="rect" id="node1" title="A Node structure representing a single node in BST." alt="" coords="5,5,217,47"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
ccf01eb6dfd0f28fd3207efa797126cd
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.47.3 (20210619.1520)
|
||||
-->
|
||||
<!-- Title: operations_on_datastructures::inorder_traversal_of_bst::Node Pages: 1 -->
|
||||
<svg width="205pt" height="39pt"
|
||||
viewBox="0.00 0.00 205.00 39.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 35)">
|
||||
<title>operations_on_datastructures::inorder_traversal_of_bst::Node</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 201,-35 201,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="A Node structure representing a single node in BST.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-30.5 159,-30.5 159,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
|
||||
<text text-anchor="middle" x="79.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::inorder_traversal_of_bst::Node</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M169.12,-19.27C174.06,-18.35 177,-17.1 177,-15.5 177,-13.01 169.83,-11.35 159.07,-10.51"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="168.58,-15.81 159.07,-20.49 169.42,-22.76 168.58,-15.81"/>
|
||||
<text text-anchor="middle" x="187" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00"> left</text>
|
||||
<text text-anchor="middle" x="187" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">right</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user