mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-24 05:42:59 +08:00
Documentation for f7a5aecce5
This commit is contained in:
@@ -151,7 +151,7 @@ Functions</h2></td></tr>
|
||||
<p >two elements a[i] and a[j] form an inversion if <code>a[i]</code> > <code>a[j]</code> and i < j</p>
|
||||
<p >Time Complexity --> <code>O(n.log n)</code></p>
|
||||
<p >Space Complexity --> <code>O(n)</code> ; additional array <code>temp[1..n]</code> </p>
|
||||
<h3><a class="anchor" id="autotoc_md97"></a>
|
||||
<h3><a class="anchor" id="autotoc_md98"></a>
|
||||
Algorithm</h3>
|
||||
<ol type="1">
|
||||
<li>The idea is similar to merge sort, divide the array into two equal or almost equal halves in each step until the base case is reached.</li>
|
||||
|
||||
Reference in New Issue
Block a user