Documentation for f789e3bb9e

This commit is contained in:
realstealthninja
2024-09-29 13:55:40 +00:00
parent 0f4f6ce798
commit e0e9107e7e
406 changed files with 3306 additions and 2185 deletions

View File

@@ -164,7 +164,7 @@ Functions</h2></td></tr>
<p>two elements a[i] and a[j] form an inversion if <code>a[i]</code> &gt; <code>a[j]</code> and i &lt; j</p>
<p>Time Complexity --&gt; <code>O(n.log n)</code></p>
<p>Space Complexity --&gt; <code>O(n)</code> ; additional array <code>temp[1..n]</code> </p>
<h3><a class="anchor" id="autotoc_md112"></a>
<h3><a class="anchor" id="autotoc_md110"></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>