Documentation for e813f9b2a6

This commit is contained in:
github-actions
2021-02-05 10:11:27 +00:00
parent e044750129
commit 3d06b0aa77
406 changed files with 7862 additions and 6611 deletions

View File

@@ -152,7 +152,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_md71"></a>
<h3><a class="anchor" id="autotoc_md72"></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>

View File

@@ -167,7 +167,7 @@ Functions</h2></td></tr>
<li>Call obj.update(node, new_val), to update the value at index 'node' to the new value. Note: node must be 0 indexed</li>
<li>Call obj.query(a, b) to get the (sum) of node values in the simple path from a to b. Note: a and b, must be 0 indexed.</li>
</ol>
<p>Sample I/O at the bottom. </p><dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000011">Todo:</a></b></dt><dd>Support edge weight queries, by storing the edge weight value in it's child algorithm verified by testing in CSES path queries: <a href="https://cses.fi/problemset/task/1138">https://cses.fi/problemset/task/1138</a> </dd></dl>
<p>Sample I/O at the bottom. </p><dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000010">Todo:</a></b></dt><dd>Support edge weight queries, by storing the edge weight value in it's child algorithm verified by testing in CSES path queries: <a href="https://cses.fi/problemset/task/1138">https://cses.fi/problemset/task/1138</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>