From 043fd378008093696d171702c88ae591f8c48a96 Mon Sep 17 00:00:00 2001
From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Date: Mon, 18 Oct 2021 15:16:34 +0000
Subject: [PATCH] Documentation for 61cbc630c3f0249da36dbede88b8212594f0e20d
---
d0/d5a/skip__list_8cpp.html | 2 +-
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map | 17 +-
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 | 2 +-
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg | 113 ++--
d1/d9e/prefix__sum__array_8cpp.html | 17 +-
...8dca7b867074164d5f45b0f3851269d_cgraph.map | 4 +
...8dca7b867074164d5f45b0f3851269d_cgraph.md5 | 1 +
...8dca7b867074164d5f45b0f3851269d_cgraph.svg | 43 ++
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map | 5 +-
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 | 2 +-
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg | 29 +-
d2/d45/segtree_8cpp.html | 596 ++++++++++++++++++
d2/d45/segtree_8cpp.js | 8 +
...23a97ea0c7ea6e33b5844a6858d902d_cgraph.map | 3 +
...23a97ea0c7ea6e33b5844a6858d902d_cgraph.md5 | 1 +
...23a97ea0c7ea6e33b5844a6858d902d_cgraph.svg | 28 +
...8dca7b867074164d5f45b0f3851269d_cgraph.map | 6 +
...8dca7b867074164d5f45b0f3851269d_cgraph.md5 | 1 +
...8dca7b867074164d5f45b0f3851269d_cgraph.svg | 85 +++
...d3e818681fb2e29cf08f4f60f82c8e0_cgraph.map | 3 +
...d3e818681fb2e29cf08f4f60f82c8e0_cgraph.md5 | 1 +
...d3e818681fb2e29cf08f4f60f82c8e0_cgraph.svg | 28 +
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map | 7 +
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 | 1 +
...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg | 118 ++++
...752659b7c1719d68fdb2ca538a93696_cgraph.map | 3 +
...752659b7c1719d68fdb2ca538a93696_cgraph.md5 | 1 +
...752659b7c1719d68fdb2ca538a93696_cgraph.svg | 28 +
.../classdata__structures_1_1_skip_list.html | 27 +-
...0a4042bdf0b6683b5f21ae7854de8a9_cgraph.map | 3 +-
...0a4042bdf0b6683b5f21ae7854de8a9_cgraph.md5 | 2 +-
...0a4042bdf0b6683b5f21ae7854de8a9_cgraph.svg | 61 +-
...6925c53e139cc6c3f7df1e9003bb0b0_cgraph.map | 5 +-
...6925c53e139cc6c3f7df1e9003bb0b0_cgraph.md5 | 2 +-
...6925c53e139cc6c3f7df1e9003bb0b0_cgraph.svg | 43 +-
de/db6/segtree_8cpp__incl.map | 7 +
de/db6/segtree_8cpp__incl.md5 | 1 +
de/db6/segtree_8cpp__incl.svg | 82 +++
dir_074119ce3a874b57120c49a0cc4bb5ad.html | 3 +
dir_074119ce3a874b57120c49a0cc4bb5ad.js | 1 +
files.html | 3 +-
globals_c.html | 1 +
globals_func_c.html | 1 +
globals_func_m.html | 2 +-
globals_func_q.html | 1 +
globals_func_t.html | 2 +-
globals_func_u.html | 1 +
globals_m.html | 2 +-
globals_q.html | 1 +
globals_t.html | 2 +-
globals_u.html | 1 +
navtreedata.js | 20 +-
navtreeindex0.js | 64 +-
navtreeindex1.js | 26 +-
navtreeindex10.js | 34 +-
navtreeindex11.js | 56 +-
navtreeindex12.js | 70 +-
navtreeindex13.js | 72 +--
navtreeindex14.js | 54 +-
navtreeindex2.js | 50 +-
navtreeindex3.js | 56 +-
navtreeindex4.js | 78 +--
navtreeindex5.js | 82 +--
navtreeindex6.js | 82 +--
navtreeindex7.js | 54 +-
navtreeindex8.js | 60 +-
navtreeindex9.js | 56 +-
search/all_12.js | 2 +-
search/all_14.js | 489 +++++++-------
search/all_15.js | 71 +--
search/all_16.js | 6 +-
search/all_4.js | 119 ++--
search/all_e.js | 12 +-
search/files_13.js | 47 +-
search/functions_11.js | 2 +-
search/functions_14.js | 4 +-
search/functions_15.js | 4 +-
search/functions_3.js | 77 +--
search/functions_d.js | 4 +-
79 files changed, 2165 insertions(+), 993 deletions(-)
create mode 100644 d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
create mode 100644 d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
create mode 100644 d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
create mode 100644 d2/d45/segtree_8cpp.html
create mode 100644 d2/d45/segtree_8cpp.js
create mode 100644 d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.map
create mode 100644 d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.md5
create mode 100644 d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.svg
create mode 100644 d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
create mode 100644 d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
create mode 100644 d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
create mode 100644 d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.map
create mode 100644 d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.md5
create mode 100644 d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.svg
create mode 100644 d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
create mode 100644 d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
create mode 100644 d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
create mode 100644 d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.map
create mode 100644 d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.md5
create mode 100644 d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.svg
create mode 100644 de/db6/segtree_8cpp__incl.map
create mode 100644 de/db6/segtree_8cpp__incl.md5
create mode 100644 de/db6/segtree_8cpp__incl.svg
diff --git a/d0/d5a/skip__list_8cpp.html b/d0/d5a/skip__list_8cpp.html
index 831eb669f..37206c2f7 100644
--- a/d0/d5a/skip__list_8cpp.html
+++ b/d0/d5a/skip__list_8cpp.html
@@ -190,7 +190,7 @@ constexpr float
data_struc
-
diff --git a/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
index 77b900410..66ab18522 100644
--- a/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
+++ b/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -1,10 +1,11 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
index 2dc206677..a29f0faef 100644
--- a/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
+++ b/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -1 +1 @@
-a69a3eaa8b41f050beea8bf77ae4d68b
\ No newline at end of file
+c520674ae7f7b7ad4a360d4c1159ef43
\ No newline at end of file
diff --git a/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
index ca0968887..455919373 100644
--- a/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
+++ b/d0/d5a/skip__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -4,11 +4,11 @@
-
-
+
+
main
-
+
Node1
@@ -22,76 +22,76 @@
Node2
-
-data_structures::SkipList
-::displayList
+
+data_structures::SkipList
+::displayList
Node1->Node2
-
-
+
+
Node4
-
-data_structures::SkipList
-::insertElement
+
+data_structures::SkipList
+::insertElement
Node1->Node4
-
-
+
+
Node6
-
-std::rand
+
+std::rand
-
+
Node1->Node6
-
-
+
+
-
-
-Node7
-
+
+
+Node8
+
std::srand
-
-
-Node1->Node7
+
+
+Node1->Node8
-
-
-Node8
-
+
+
+Node9
+
std::time
-
-
-Node1->Node8
+
+
+Node1->Node9
@@ -99,44 +99,65 @@
Node3
-
-std::endl
+
+std::endl
Node2->Node3
-
-
+
+
Node4->Node3
-
-
+
+
Node5
-
-data_structures::SkipList
-::randomLevel
+
+data_structures::SkipList
+::randomLevel
Node4->Node5
-
-
+
+
+
+
+
+Node7
+
+
+update
+
+
+
+
+
+Node4->Node7
+
+
Node5->Node6
-
-
+
+
+
+
+
+Node7->Node7
+
+
diff --git a/d1/d9e/prefix__sum__array_8cpp.html b/d1/d9e/prefix__sum__array_8cpp.html
index c694729a8..d8c0030c5 100644
--- a/d1/d9e/prefix__sum__array_8cpp.html
+++ b/d1/d9e/prefix__sum__array_8cpp.html
@@ -218,7 +218,7 @@ Here is the call graph for this function:
-
@@ -296,16 +296,23 @@ Here is the call graph for this function:
- 68 assert(range_queries::prefix_sum_array::query(1, 10) ==
+
- 70 assert(range_queries::prefix_sum_array::query(4, 6) ==
+
- 72 assert(range_queries::prefix_sum_array::query(5, 9) ==
+
void build(std::vector< int64_t > original_array)
function that builds the PSA
Definition: prefix_sum_array.cpp:41
+int64_t query(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, uint64_t qlow, uint64_t qhigh, uint64_t low, uint64_t high, uint64_t pos)
Returns the sum of all elements in a range.
Definition: segtree.cpp:62
-
+
+
+
diff --git a/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map b/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
new file mode 100644
index 000000000..7b9e62410
--- /dev/null
+++ b/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5 b/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
new file mode 100644
index 000000000..caee2071e
--- /dev/null
+++ b/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
@@ -0,0 +1 @@
+f4b2de5e1d80209e03c2c1f60670568b
\ No newline at end of file
diff --git a/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg b/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
new file mode 100644
index 000000000..512595489
--- /dev/null
+++ b/d1/d9e/prefix__sum__array_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+test
+
+
+
+Node1
+
+
+test
+
+
+
+
+
+Node2
+
+
+query
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node2->Node2
+
+
+
+
+
diff --git a/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
index d700ab878..6346afe5a 100644
--- a/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
+++ b/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -1,4 +1,5 @@
-
-
+
+
+
diff --git a/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
index f93ad06ff..8f9e24ff8 100644
--- a/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
+++ b/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -1 +1 @@
-a0f50f064e17dc3de597c81c20292210
\ No newline at end of file
+48919acd9bf2bea9236d12aa3f959490
\ No newline at end of file
diff --git a/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
index 8ddae4d58..de146a5f6 100644
--- a/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
+++ b/d1/d9e/prefix__sum__array_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -4,11 +4,11 @@
-
-
+
+
main
-
+
Node1
@@ -33,5 +33,26 @@
+
+
+Node3
+
+
+query
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+Node3->Node3
+
+
+
diff --git a/d2/d45/segtree_8cpp.html b/d2/d45/segtree_8cpp.html
new file mode 100644
index 000000000..64577989c
--- /dev/null
+++ b/d2/d45/segtree_8cpp.html
@@ -0,0 +1,596 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: range_queries/segtree.cpp File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Implementation of Segment Tree data structure.
+More...
+
#include <cassert>
+#include <cmath>
+#include <iostream>
+#include <vector>
+
+
+void ConsTree (const std::vector < int64_t > &arr, std::vector < int64_t > *segtree, uint64_t low, uint64_t high, uint64_t pos)
+ for std::vector More...
+
+int64_t query (std::vector < int64_t > *segtree, std::vector < int64_t > *lazy, uint64_t qlow, uint64_t qhigh, uint64_t low, uint64_t high, uint64_t pos)
+ Returns the sum of all elements in a range. More...
+
+void update (std::vector < int64_t > *segtree, std::vector < int64_t > *lazy, int64_t start, int64_t end, int64_t delta, uint64_t low, uint64_t high, uint64_t pos)
+ Updates a range of the segment tree. More...
+
+static void test ()
+ Self-test implementation. More...
+
+int main ()
+ Main function. More...
+
+
+
+
Implementation of Segment Tree data structure.
+
A segment tree, also known as a statistic tree, is a tree data structure used for storing information about intervals, or segments. Its classical version allows querying which of the stored segments contain a given point, but our modification allows us to perform (query) any binary operation on any range in the array in O(logN) time. Here, we have used addition (+). For range updates, we have used lazy propagation.
+
+Space Complexity : O(NlogN)
+
+Build Time Complexity : O(NlogN)
+
+Query Time Complexity : O(logN)
+ Author Madhav Gaba
+
+Soham Roy
+
+
+
+
+
◆ ConsTree()
+
+
+
+
+
+ void ConsTree
+ (
+ const std::vector < int64_t > &
+ arr ,
+
+
+
+
+ std::vector < int64_t > *
+ segtree ,
+
+
+
+
+ uint64_t
+ low ,
+
+
+
+
+ uint64_t
+ high ,
+
+
+
+
+ uint64_t
+ pos
+
+
+
+ )
+
+
+
+
+
+
for std::vector
+
for assert for log2 for IO operations
+
Constructs the initial segment tree
+
Parameters
+
+ arr input to construct the tree out of
+ segtree the segment tree
+ low inclusive lowest index of arr to begin at
+ high inclusive highest index of arr to end at
+ pos index of segtree to fill (eg. root node)
+
+
+
+
Returns void
+
+
+
40 (*segtree)[pos] = arr[low];
+
+
+
+
44 uint64_t mid = (low + high) / 2;
+
45 ConsTree (arr, segtree, low, mid, 2 * pos + 1);
+
46 ConsTree (arr, segtree, mid + 1, high, 2 * pos + 2);
+
47 (*segtree)[pos] = (*segtree)[2 * pos + 1] + (*segtree)[2 * pos + 2];
+
+
void ConsTree(const std::vector< int64_t > &arr, std::vector< int64_t > *segtree, uint64_t low, uint64_t high, uint64_t pos)
for std::vector
Definition: segtree.cpp:37
+
+
+
+
+
+
+
◆ main()
+
+
+
+
+
+ int main
+ (
+ void
+ )
+
+
+
+
+
+
Main function.
+
Returns 0 on exit
+
+
+
+
170 std::cout <<
"Enter number of elements: " ;
+
+
+
+
+
175 uint64_t
max =
static_cast< uint64_t
> (2 *
pow (2,
ceil (log2(n))) - 1);
+
+
+
+
179 std::cout <<
"\nDo you wish to enter each number?:\n"
+
+
181 "0: No (default initialize them to 0)\n" ;
+
+
+
+
185 std::cout <<
"Enter " << n <<
" numbers:\n" ;
+
186 for (
int i = 1; i <= n; i++) {
+
+
+
+
+
+
192 ConsTree (arr, &segtree, 0, n - 1, 0);
+
+
+
+
196 "1: Range update (input)\n"
+
197 "2: Range query (output)\n"
+
+
+
+
+
202 std::cout <<
"Enter 1-indexed lower bound, upper bound & value:\n" ;
+
+
204 uint64_t p = 1, q = 1, v = 0;
+
+
206 update (&segtree, &lazy, p - 1, q - 1, v, 0, n - 1, 0);
+
207 }
else if (choice == 2) {
+
208 std::cout <<
"Enter 1-indexed lower bound & upper bound:\n" ;
+
+
210 uint64_t p = 1, q = 1;
+
+
+
+
+
215 }
while (choice > 0);
+
+
+
+
+
+
+
+
+
int64_t query(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, uint64_t qlow, uint64_t qhigh, uint64_t low, uint64_t high, uint64_t pos)
Returns the sum of all elements in a range.
Definition: segtree.cpp:62
+
static void test()
Self-test implementation.
Definition: segtree.cpp:146
+
void update(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, int64_t start, int64_t end, int64_t delta, uint64_t low, uint64_t high, uint64_t pos)
Updates a range of the segment tree.
Definition: segtree.cpp:102
+
+
+
+
+
+
+
+
◆ query()
+
+
+
+
+
+ int64_t query
+ (
+ std::vector < int64_t > *
+ segtree ,
+
+
+
+
+ std::vector < int64_t > *
+ lazy ,
+
+
+
+
+ uint64_t
+ qlow ,
+
+
+
+
+ uint64_t
+ qhigh ,
+
+
+
+
+ uint64_t
+ low ,
+
+
+
+
+ uint64_t
+ high ,
+
+
+
+
+ uint64_t
+ pos
+
+
+
+ )
+
+
+
+
+
+
Returns the sum of all elements in a range.
+
Parameters
+
+ segtree the segment tree
+ lazy for lazy propagation
+ qlow lower index of the required query
+ qhigh higher index of the required query
+ low lower index of query for this function call
+ high higher index of query for this function call
+ pos index of segtree to consider (eg. root node)
+
+
+
+
Returns result of the range query for this function call
+
+
65 if (low > high || qlow > high || low > qhigh) {
+
+
+
+
69 if ((*lazy)[pos] != 0) {
+
70 (*segtree)[pos] += (*lazy)[pos] * (high - low + 1);
+
+
+
73 (*lazy)[2 * pos + 1] += (*lazy)[pos];
+
74 (*lazy)[2 * pos + 2] += (*lazy)[pos];
+
+
+
+
+
79 if (qlow <= low && qhigh >= high) {
+
80 return (*segtree)[pos];
+
+
+
83 uint64_t mid = (low + high) / 2;
+
+
85 return query (segtree, lazy, qlow, qhigh, low, mid, 2 * pos + 1) +
+
86 query (segtree, lazy, qlow, qhigh, mid + 1, high, 2 * pos + 2);
+
+
+
+
+
+
+
+
◆ test()
+
+
+
+
+
+
+
+
+ static void test
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Self-test implementation.
+
Returns void
+
+
147 int64_t
max =
static_cast< int64_t
> (2 *
pow (2,
ceil (log2(7))) - 1);
+
+
+
+
151 ConsTree (arr, &segtree, 0, 7 - 1, 0);
+
+
153 assert(
query (&segtree, &lazy, 1, 5, 0, 7 - 1, 0) == 2 + 3 + 4 + 5 + 6);
+
+
155 update (&segtree, &lazy, 2, 4, 1, 0, 7 - 1, 0);
+
156 assert(
query (&segtree, &lazy, 1, 5, 0, 7 - 1, 0) == 2 + 4 + 5 + 6 + 6);
+
+
158 update (&segtree, &lazy, 0, 6, -2, 0, 7 - 1, 0);
+
159 assert(
query (&segtree, &lazy, 0, 4, 0, 7 - 1, 0) == -1 + 0 + 2 + 3 + 4);
+
+
+
+
+
+
+
+
◆ update()
+
+
+
+
+
+ void update
+ (
+ std::vector < int64_t > *
+ segtree ,
+
+
+
+
+ std::vector < int64_t > *
+ lazy ,
+
+
+
+
+ int64_t
+ start ,
+
+
+
+
+ int64_t
+ end ,
+
+
+
+
+ int64_t
+ delta ,
+
+
+
+
+ uint64_t
+ low ,
+
+
+
+
+ uint64_t
+ high ,
+
+
+
+
+ uint64_t
+ pos
+
+
+
+ )
+
+
+
+
+
+
Updates a range of the segment tree.
+
Parameters
+
+ segtree the segment tree
+ lazy for lazy propagation
+ start lower index of the required query
+ end higher index of the required query
+ delta integer to add to each element of the range
+ low lower index of query for this function call
+ high higher index of query for this function call
+ pos index of segtree to consider (eg. root node)
+
+
+
+
Returns void
+
+
+
+
+
+
109 if ((*lazy)[pos] != 0) {
+
110 (*segtree)[pos] += (*lazy)[pos] * (high - low + 1);
+
+
+
113 (*lazy)[2 * pos + 1] += (*lazy)[pos];
+
114 (*lazy)[2 * pos + 2] += (*lazy)[pos];
+
+
+
+
+
119 if (start > high || end < low) {
+
+
+
+
123 if (start <= low && end >= high) {
+
124 (*segtree)[pos] += delta * (high - low + 1);
+
+
+
127 (*lazy)[2 * pos + 1] += delta;
+
128 (*lazy)[2 * pos + 2] += delta;
+
+
+
+
+
+
134 uint64_t mid = (low + high) / 2;
+
+
136 update (segtree, lazy, start, end, delta, low, mid, 2 * pos + 1);
+
137 update (segtree, lazy, start, end, delta, mid + 1, high, 2 * pos + 2);
+
138 (*segtree)[pos] = (*segtree)[2 * pos + 1] + (*segtree)[2 * pos + 2];
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d2/d45/segtree_8cpp.js b/d2/d45/segtree_8cpp.js
new file mode 100644
index 000000000..a3e4f9d23
--- /dev/null
+++ b/d2/d45/segtree_8cpp.js
@@ -0,0 +1,8 @@
+var segtree_8cpp =
+[
+ [ "ConsTree", "d2/d45/segtree_8cpp.html#ae752659b7c1719d68fdb2ca538a93696", null ],
+ [ "main", "d2/d45/segtree_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
+ [ "query", "d2/d45/segtree_8cpp.html#a423a97ea0c7ea6e33b5844a6858d902d", null ],
+ [ "test", "d2/d45/segtree_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ],
+ [ "update", "d2/d45/segtree_8cpp.html#abd3e818681fb2e29cf08f4f60f82c8e0", null ]
+];
\ No newline at end of file
diff --git a/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.map b/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.map
new file mode 100644
index 000000000..fe2b36fef
--- /dev/null
+++ b/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.md5 b/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.md5
new file mode 100644
index 000000000..3281fb778
--- /dev/null
+++ b/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.md5
@@ -0,0 +1 @@
+8d1b572d3bf33c468bcf287b1b2812c4
\ No newline at end of file
diff --git a/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.svg b/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.svg
new file mode 100644
index 000000000..c25ed6975
--- /dev/null
+++ b/d2/d45/segtree_8cpp_a423a97ea0c7ea6e33b5844a6858d902d_cgraph.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+query
+
+
+
+Node1
+
+
+query
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map b/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
new file mode 100644
index 000000000..20192fdbe
--- /dev/null
+++ b/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5 b/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
new file mode 100644
index 000000000..d6ef646eb
--- /dev/null
+++ b/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
@@ -0,0 +1 @@
+48d5daf737194344f345cb33b5a9bd3c
\ No newline at end of file
diff --git a/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg b/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
new file mode 100644
index 000000000..c2d3f777e
--- /dev/null
+++ b/d2/d45/segtree_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+test
+
+
+
+Node1
+
+
+test
+
+
+
+
+
+Node2
+
+
+ConsTree
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+query
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+update
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node2->Node2
+
+
+
+
+
+Node3->Node3
+
+
+
+
+
+Node4->Node4
+
+
+
+
+
diff --git a/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.map b/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.map
new file mode 100644
index 000000000..1551226eb
--- /dev/null
+++ b/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.md5 b/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.md5
new file mode 100644
index 000000000..4674bbdec
--- /dev/null
+++ b/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.md5
@@ -0,0 +1 @@
+21917203159ef052b59a5fbf8d0d61f3
\ No newline at end of file
diff --git a/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.svg b/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.svg
new file mode 100644
index 000000000..11eaf4570
--- /dev/null
+++ b/d2/d45/segtree_8cpp_abd3e818681fb2e29cf08f4f60f82c8e0_cgraph.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+update
+
+
+
+Node1
+
+
+update
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
new file mode 100644
index 000000000..befe637dd
--- /dev/null
+++ b/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
new file mode 100644
index 000000000..07cb578cb
--- /dev/null
+++ b/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -0,0 +1 @@
+d31b00bcedd7e042db28c1402546a42a
\ No newline at end of file
diff --git a/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
new file mode 100644
index 000000000..0ea0127f7
--- /dev/null
+++ b/d2/d45/segtree_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+main
+
+
+
+Node1
+
+
+main
+
+
+
+
+
+Node2
+
+
+ConsTree
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+query
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+test
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+update
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node2->Node2
+
+
+
+
+
+Node3->Node3
+
+
+
+
+
+Node4->Node2
+
+
+
+
+
+Node4->Node3
+
+
+
+
+
+Node4->Node5
+
+
+
+
+
+Node5->Node5
+
+
+
+
+
diff --git a/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.map b/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.map
new file mode 100644
index 000000000..7b78deeea
--- /dev/null
+++ b/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.md5 b/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.md5
new file mode 100644
index 000000000..9e8c0c75f
--- /dev/null
+++ b/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.md5
@@ -0,0 +1 @@
+2fa841aa2ef8e7f2d3fff01b92b93bbe
\ No newline at end of file
diff --git a/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.svg b/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.svg
new file mode 100644
index 000000000..c060cc3fd
--- /dev/null
+++ b/d2/d45/segtree_8cpp_ae752659b7c1719d68fdb2ca538a93696_cgraph.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ConsTree
+
+
+
+Node1
+
+
+ConsTree
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/d4/d90/classdata__structures_1_1_skip_list.html b/d4/d90/classdata__structures_1_1_skip_list.html
index 21868c76e..b0065b2c9 100644
--- a/d4/d90/classdata__structures_1_1_skip_list.html
+++ b/d4/d90/classdata__structures_1_1_skip_list.html
@@ -194,14 +194,14 @@ int level
-
-
137 update.fill(
nullptr );
+
+
139 for (
int i =
level ; i >= 0; i--) {
140 while (x->forward[i] !=
nullptr && x->forward[i]->key < key) {
-
+
@@ -210,10 +210,10 @@ int
level
151 for (
int i = 0; i <=
level ; i++) {
-
152 if (update[i]->forward[i] != x) {
+
152 if (
update [i]->forward[i] != x) {
-
155 update[i]->forward[i] = x->forward[i];
+
155 update [i]->forward[i] = x->forward[i];
@@ -225,11 +225,12 @@ int
level
+
void update(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, int64_t start, int64_t end, int64_t delta, uint64_t low, uint64_t high, uint64_t pos)
Updates a range of the segment tree.
Definition: segtree.cpp:102
-
@@ -323,14 +324,14 @@ Here is the call graph for this function:
-
-
+
+
96 for (
int i =
level ; i >= 0; i--) {
97 while (x->forward[i] !=
nullptr && x->forward[i]->key < key) {
-
+
@@ -340,7 +341,7 @@ Here is the call graph for this function:
109 if (rlevel >
level ) {
- 110 for (
int i =
level + 1; i < rlevel + 1; i++) update[i] =
header ;
+
@@ -349,8 +350,8 @@ Here is the call graph for this function:
117 std::make_shared<Node>(key, rlevel, value);
118 for (
int i = 0; i <= rlevel; i++) {
- 119 n->forward[i] = update[i]->forward[i];
- 120 update[i]->forward[i] = n;
+ 119 n->forward[i] =
update [i]->forward[i];
+ 120 update [i]->forward[i] = n;
@@ -362,7 +363,7 @@ Here is the call graph for this function:
-
diff --git a/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.map b/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.map
index a35078fed..cb960361d 100644
--- a/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.map
+++ b/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.map
@@ -1,6 +1,7 @@
-
+
+
diff --git a/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.md5 b/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.md5
index 5955fbf0f..c235504d9 100644
--- a/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.md5
+++ b/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.md5
@@ -1 +1 @@
-4d2d7fdb4639b7eb2e6b9f9cb3052f5e
\ No newline at end of file
+f9485b3804fc7ce3951dc366b873c78f
\ No newline at end of file
diff --git a/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.svg b/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.svg
index 2dd5628d9..c7f69f34c 100644
--- a/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.svg
+++ b/d4/d90/classdata__structures_1_1_skip_list_a40a4042bdf0b6683b5f21ae7854de8a9_cgraph.svg
@@ -4,18 +4,18 @@
-
-
+
+
data_structures::SkipList::insertElement
-
+
Node1
-
-data_structures::SkipList
-::insertElement
+
+data_structures::SkipList
+::insertElement
@@ -23,47 +23,68 @@
Node2
-
-std::endl
+
+std::endl
Node1->Node2
-
-
+
+
Node3
-
-data_structures::SkipList
-::randomLevel
+
+data_structures::SkipList
+::randomLevel
Node1->Node3
-
-
+
+
+
+
+
+Node5
+
+
+update
+
+
+
+
+
+Node1->Node5
+
+
Node4
-
-std::rand
+
+std::rand
Node3->Node4
-
-
+
+
+
+
+
+Node5->Node5
+
+
diff --git a/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.map b/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.map
index db6e8d986..57dad5897 100644
--- a/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.map
+++ b/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.map
@@ -1,4 +1,5 @@
-
-
+
+
+
diff --git a/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.md5 b/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.md5
index 5ed46af3e..63a10db9c 100644
--- a/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.md5
+++ b/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.md5
@@ -1 +1 @@
-95cab6fb91495582002f6254d98cb111
\ No newline at end of file
+6c3cc026ffb7d042d941d8bcd327c497
\ No newline at end of file
diff --git a/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.svg b/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.svg
index 0b9438b1d..c2836fc09 100644
--- a/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.svg
+++ b/d4/d90/classdata__structures_1_1_skip_list_a86925c53e139cc6c3f7df1e9003bb0b0_cgraph.svg
@@ -4,18 +4,18 @@
-
-
+
+
data_structures::SkipList::deleteElement
-
+
Node1
-
-data_structures::SkipList
-::deleteElement
+
+data_structures::SkipList
+::deleteElement
@@ -23,16 +23,37 @@
Node2
-
-std::endl
+
+std::endl
Node1->Node2
-
-
+
+
+
+
+
+Node3
+
+
+update
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node3->Node3
+
+
diff --git a/de/db6/segtree_8cpp__incl.map b/de/db6/segtree_8cpp__incl.map
new file mode 100644
index 000000000..9d7299d56
--- /dev/null
+++ b/de/db6/segtree_8cpp__incl.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/de/db6/segtree_8cpp__incl.md5 b/de/db6/segtree_8cpp__incl.md5
new file mode 100644
index 000000000..673390d51
--- /dev/null
+++ b/de/db6/segtree_8cpp__incl.md5
@@ -0,0 +1 @@
+677eb5bdf1a762b45f2fbf6fce12b807
\ No newline at end of file
diff --git a/de/db6/segtree_8cpp__incl.svg b/de/db6/segtree_8cpp__incl.svg
new file mode 100644
index 000000000..c36a9abc3
--- /dev/null
+++ b/de/db6/segtree_8cpp__incl.svg
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+range_queries/segtree.cpp
+
+
+
+Node1
+
+
+range_queries/segtree.cpp
+
+
+
+
+
+Node2
+
+
+cassert
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+cmath
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+iostream
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+vector
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
diff --git a/dir_074119ce3a874b57120c49a0cc4bb5ad.html b/dir_074119ce3a874b57120c49a0cc4bb5ad.html
index 512417aff..51a14cc5d 100644
--- a/dir_074119ce3a874b57120c49a0cc4bb5ad.html
+++ b/dir_074119ce3a874b57120c49a0cc4bb5ad.html
@@ -108,6 +108,9 @@ Files
file prefix_sum_array.cpp
Prefix Sum Array data structure implementation.
+file segtree.cpp
+ Implementation of Segment Tree data structure.
+
file sparse_table.cpp
Implementation of Sparse Table data structure.
diff --git a/dir_074119ce3a874b57120c49a0cc4bb5ad.js b/dir_074119ce3a874b57120c49a0cc4bb5ad.js
index a3d83df29..9a303641c 100644
--- a/dir_074119ce3a874b57120c49a0cc4bb5ad.js
+++ b/dir_074119ce3a874b57120c49a0cc4bb5ad.js
@@ -4,5 +4,6 @@ var dir_074119ce3a874b57120c49a0cc4bb5ad =
[ "heavy_light_decomposition.cpp", "d2/de9/heavy__light__decomposition_8cpp.html", "d2/de9/heavy__light__decomposition_8cpp" ],
[ "persistent_seg_tree_lazy_prop.cpp", "d5/d58/persistent__seg__tree__lazy__prop_8cpp.html", "d5/d58/persistent__seg__tree__lazy__prop_8cpp" ],
[ "prefix_sum_array.cpp", "d1/d9e/prefix__sum__array_8cpp.html", "d1/d9e/prefix__sum__array_8cpp" ],
+ [ "segtree.cpp", "d2/d45/segtree_8cpp.html", "d2/d45/segtree_8cpp" ],
[ "sparse_table.cpp", "d4/d96/range__queries_2sparse__table_8cpp.html", "d4/d96/range__queries_2sparse__table_8cpp" ]
];
\ No newline at end of file
diff --git a/files.html b/files.html
index 2fc28dd40..9f45c061c 100644
--- a/files.html
+++ b/files.html
@@ -302,7 +302,8 @@ solve-a-rat-in-a-maze-c-java-pytho/"
heavy_light_decomposition.cpp Heavy Light Decomposition implementation
persistent_seg_tree_lazy_prop.cpp Persistent segment tree with range updates (lazy propagation)
prefix_sum_array.cpp Prefix Sum Array data structure implementation
- sparse_table.cpp Implementation of Sparse Table data structure
+ segtree.cpp Implementation of Segment Tree data structure
+ sparse_table.cpp Implementation of Sparse Table data structure
► search
binary_search.cpp Binary search algorithm
exponential_search.cpp Exponential search algorithm
diff --git a/globals_c.html b/globals_c.html
index e4bd8f573..336fa7200 100644
--- a/globals_c.html
+++ b/globals_c.html
@@ -102,6 +102,7 @@ $(document).ready(function(){initNavTree('globals_c.html',''); initResizable();
CombSort() : comb_sort.cpp
compare() : shell_sort2.cpp
complex_str() : durand_kerner_roots.cpp
+ConsTree() : segtree.cpp
create_list() : hash_search.cpp
create_matrix() : qr_eigen_values.cpp
create_random_array() : insertion_sort.cpp
diff --git a/globals_func_c.html b/globals_func_c.html
index 20ba50281..bff1a8ede 100644
--- a/globals_func_c.html
+++ b/globals_func_c.html
@@ -100,6 +100,7 @@ $(document).ready(function(){initNavTree('globals_func_c.html',''); initResizabl
CombSort() : comb_sort.cpp
compare() : shell_sort2.cpp
complex_str() : durand_kerner_roots.cpp
+ConsTree() : segtree.cpp
create_list() : hash_search.cpp
create_matrix() : qr_eigen_values.cpp
create_random_array() : insertion_sort.cpp
diff --git a/globals_func_m.html b/globals_func_m.html
index fdc700c45..14ca66774 100644
--- a/globals_func_m.html
+++ b/globals_func_m.html
@@ -93,7 +93,7 @@ $(document).ready(function(){initNavTree('globals_func_m.html',''); initResizabl
- m -
-main() : graph_coloring.cpp , knight_tour.cpp , minimax.cpp , n_queens.cpp , n_queens_all_solution_optimised.cpp , nqueen_print_all_solutions.cpp , rat_maze.cpp , subarray_sum.cpp , subset_sum.cpp , sudoku_solve.cpp , wildcard_matching.cpp , count_of_set_bits.cpp , count_of_trailing_ciphers_in_factorial_n.cpp , hamming_distance.cpp , caesar_cipher.cpp , elliptic_curve_key_exchange.cpp , hill_cipher.cpp , morse_code.cpp , vigenere_cipher.cpp , xor_cipher.cpp , fcfs_scheduling.cpp , avltree.cpp , disjoint_set.cpp , linked_list.cpp , linkedlist_implentation_usingarray.cpp , list_array.cpp , queue_using_array.cpp , queue_using_two_stacks.cpp , reverse_a_linked_list.cpp , skip_list.cpp , sparse_table.cpp , tree_234.cpp , trie_modern.cpp , trie_tree.cpp , trie_using_hashmap.cpp , karatsuba_algorithm_for_fast_multiplication.cpp , 0_1_knapsack.cpp , abbreviation.cpp , coin_change_topdown.cpp , cut_rod.cpp , house_robber.cpp , kadane2.cpp , longest_increasing_subsequence.cpp , longest_palindromic_subsequence.cpp , minimum_edit_distance.cpp , palindrome_partitioning.cpp , shortest_common_supersequence.cpp , word_break.cpp , jarvis_algorithm.cpp , line_segment_intersection.cpp , bidirectional_dijkstra.cpp , breadth_first_search.cpp , connected_components.cpp , connected_components_with_dsu.cpp , depth_first_search.cpp , depth_first_search_with_stack.cpp , dijkstra.cpp , hamiltons_cycle.cpp , hopcroft_karp.cpp , is_graph_bipartite.cpp , lowest_common_ancestor.cpp , travelling_salesman_problem.cpp , spirograph.cpp , jumpgame.cpp , chaining.cpp , double_hash_hash_table.cpp , linear_probing_hash_table.cpp , md5.cpp , quadratic_probing_hash_table.cpp , sha1.cpp , gram_schmidt.cpp , adaline_learning.cpp , kohonen_som_topology.cpp , kohonen_som_trace.cpp , neural_network.cpp , ordinary_least_squares_regressor.cpp , armstrong_number.cpp , binary_exponent.cpp , binomial_calculate.cpp , check_amicable_pair.cpp , check_factorial.cpp , check_prime.cpp , complex_numbers.cpp , double_factorial.cpp , eulers_totient_function.cpp , extended_euclid_algorithm.cpp , factorial.cpp , fast_power.cpp , fibonacci.cpp , fibonacci_fast.cpp , fibonacci_matrix_exponentiation.cpp , fibonacci_sum.cpp , finding_number_of_digits_in_a_number.cpp , gcd_iterative_euclidean.cpp , gcd_of_n_numbers.cpp , gcd_recursive_euclidean.cpp , integral_approximation.cpp , integral_approximation2.cpp , inv_sqrt.cpp , large_factorial.cpp , largest_power.cpp , lcm_sum.cpp , least_common_multiple.cpp , magic_number.cpp , miller_rabin.cpp , modular_division.cpp , modular_exponentiation.cpp , modular_inverse_fermat_little_theorem.cpp , n_bonacci.cpp , n_choose_r.cpp , ncr_modulo_p.cpp , number_of_positive_divisors.cpp , power_for_huge_numbers.cpp , power_of_two.cpp , prime_factorization.cpp , prime_numbers.cpp , primes_up_to_billion.cpp , realtime_stats.cpp , sieve_of_eratosthenes.cpp , sqrt_double.cpp , string_fibonacci.cpp , sum_of_binomial_coefficient.cpp , sum_of_digits.cpp , vector_cross_product.cpp , bisection_method.cpp , brent_method_extrema.cpp , false_position.cpp , gaussian_elimination.cpp , golden_search_extrema.cpp , lu_decompose.cpp , newton_raphson_method.cpp , ode_forward_euler.cpp , ode_midpoint_euler.cpp , ode_semi_implicit_euler.cpp , qr_decomposition.cpp , qr_eigen_values.cpp , rungekutta.cpp , successive_approximation.cpp , inorder_successor_of_bst.cpp , trie_multiple_search.cpp , buzz_number.cpp , decimal_to_hexadecimal.cpp , decimal_to_roman_numeral.cpp , fast_integer_input.cpp , happy_number.cpp , iterative_tree_traversals.cpp , kadanes3.cpp , lru_cache.cpp , matrix_exponentiation.cpp , palindrome_of_number.cpp , pascal_triangle.cpp , postfix_evaluation.cpp , primality_test.cpp , smallest_circle.cpp , sparse_matrix.cpp , spiral_print.cpp , stairs_pattern.cpp , tower_of_hanoi.cpp , vector_important_functions.cpp , addition_rule.cpp , bayes_theorem.cpp , binomial_dist.cpp , geometric_dist.cpp , poisson_dist.cpp , windowed_median.cpp , fenwick_tree.cpp , heavy_light_decomposition.cpp , persistent_seg_tree_lazy_prop.cpp , prefix_sum_array.cpp , sparse_table.cpp , binary_search.cpp , exponential_search.cpp , fibonacci_search.cpp , floyd_cycle_detection_algo.cpp , hash_search.cpp , interpolation_search.cpp , interpolation_search2.cpp , linear_search.cpp , median_search.cpp , saddleback_search.cpp , sublist_search.cpp , ternary_search.cpp , text_search.cpp , bogo_sort.cpp , comb_sort.cpp , count_inversions.cpp , cycle_sort.cpp , dnf_sort.cpp , gnome_sort.cpp , heap_sort.cpp , insertion_sort.cpp , merge_insertion_sort.cpp , merge_sort.cpp , pancake_sort.cpp , pigeonhole_sort.cpp , quick_sort.cpp , quick_sort_3.cpp , radix_sort2.cpp , random_pivot_quick_sort.cpp , recursive_bubble_sort.cpp , selection_sort_recursive.cpp , shell_sort2.cpp , strand_sort.cpp , wave_sort.cpp , brute_force_string_searching.cpp , horspool.cpp , knuth_morris_pratt.cpp , manacher_algorithm.cpp , rabin_karp.cpp , z_function.cpp
+main() : graph_coloring.cpp , knight_tour.cpp , minimax.cpp , n_queens.cpp , n_queens_all_solution_optimised.cpp , nqueen_print_all_solutions.cpp , rat_maze.cpp , subarray_sum.cpp , subset_sum.cpp , sudoku_solve.cpp , wildcard_matching.cpp , count_of_set_bits.cpp , count_of_trailing_ciphers_in_factorial_n.cpp , hamming_distance.cpp , caesar_cipher.cpp , elliptic_curve_key_exchange.cpp , hill_cipher.cpp , morse_code.cpp , vigenere_cipher.cpp , xor_cipher.cpp , fcfs_scheduling.cpp , avltree.cpp , disjoint_set.cpp , linked_list.cpp , linkedlist_implentation_usingarray.cpp , list_array.cpp , queue_using_array.cpp , queue_using_two_stacks.cpp , reverse_a_linked_list.cpp , skip_list.cpp , sparse_table.cpp , tree_234.cpp , trie_modern.cpp , trie_tree.cpp , trie_using_hashmap.cpp , karatsuba_algorithm_for_fast_multiplication.cpp , 0_1_knapsack.cpp , abbreviation.cpp , coin_change_topdown.cpp , cut_rod.cpp , house_robber.cpp , kadane2.cpp , longest_increasing_subsequence.cpp , longest_palindromic_subsequence.cpp , minimum_edit_distance.cpp , palindrome_partitioning.cpp , shortest_common_supersequence.cpp , word_break.cpp , jarvis_algorithm.cpp , line_segment_intersection.cpp , bidirectional_dijkstra.cpp , breadth_first_search.cpp , connected_components.cpp , connected_components_with_dsu.cpp , depth_first_search.cpp , depth_first_search_with_stack.cpp , dijkstra.cpp , hamiltons_cycle.cpp , hopcroft_karp.cpp , is_graph_bipartite.cpp , lowest_common_ancestor.cpp , travelling_salesman_problem.cpp , spirograph.cpp , jumpgame.cpp , chaining.cpp , double_hash_hash_table.cpp , linear_probing_hash_table.cpp , md5.cpp , quadratic_probing_hash_table.cpp , sha1.cpp , gram_schmidt.cpp , adaline_learning.cpp , kohonen_som_topology.cpp , kohonen_som_trace.cpp , neural_network.cpp , ordinary_least_squares_regressor.cpp , armstrong_number.cpp , binary_exponent.cpp , binomial_calculate.cpp , check_amicable_pair.cpp , check_factorial.cpp , check_prime.cpp , complex_numbers.cpp , double_factorial.cpp , eulers_totient_function.cpp , extended_euclid_algorithm.cpp , factorial.cpp , fast_power.cpp , fibonacci.cpp , fibonacci_fast.cpp , fibonacci_matrix_exponentiation.cpp , fibonacci_sum.cpp , finding_number_of_digits_in_a_number.cpp , gcd_iterative_euclidean.cpp , gcd_of_n_numbers.cpp , gcd_recursive_euclidean.cpp , integral_approximation.cpp , integral_approximation2.cpp , inv_sqrt.cpp , large_factorial.cpp , largest_power.cpp , lcm_sum.cpp , least_common_multiple.cpp , magic_number.cpp , miller_rabin.cpp , modular_division.cpp , modular_exponentiation.cpp , modular_inverse_fermat_little_theorem.cpp , n_bonacci.cpp , n_choose_r.cpp , ncr_modulo_p.cpp , number_of_positive_divisors.cpp , power_for_huge_numbers.cpp , power_of_two.cpp , prime_factorization.cpp , prime_numbers.cpp , primes_up_to_billion.cpp , realtime_stats.cpp , sieve_of_eratosthenes.cpp , sqrt_double.cpp , string_fibonacci.cpp , sum_of_binomial_coefficient.cpp , sum_of_digits.cpp , vector_cross_product.cpp , bisection_method.cpp , brent_method_extrema.cpp , false_position.cpp , gaussian_elimination.cpp , golden_search_extrema.cpp , lu_decompose.cpp , newton_raphson_method.cpp , ode_forward_euler.cpp , ode_midpoint_euler.cpp , ode_semi_implicit_euler.cpp , qr_decomposition.cpp , qr_eigen_values.cpp , rungekutta.cpp , successive_approximation.cpp , inorder_successor_of_bst.cpp , trie_multiple_search.cpp , buzz_number.cpp , decimal_to_hexadecimal.cpp , decimal_to_roman_numeral.cpp , fast_integer_input.cpp , happy_number.cpp , iterative_tree_traversals.cpp , kadanes3.cpp , lru_cache.cpp , matrix_exponentiation.cpp , palindrome_of_number.cpp , pascal_triangle.cpp , postfix_evaluation.cpp , primality_test.cpp , smallest_circle.cpp , sparse_matrix.cpp , spiral_print.cpp , stairs_pattern.cpp , tower_of_hanoi.cpp , vector_important_functions.cpp , addition_rule.cpp , bayes_theorem.cpp , binomial_dist.cpp , geometric_dist.cpp , poisson_dist.cpp , windowed_median.cpp , fenwick_tree.cpp , heavy_light_decomposition.cpp , persistent_seg_tree_lazy_prop.cpp , prefix_sum_array.cpp , segtree.cpp , sparse_table.cpp , binary_search.cpp , exponential_search.cpp , fibonacci_search.cpp , floyd_cycle_detection_algo.cpp , hash_search.cpp , interpolation_search.cpp , interpolation_search2.cpp , linear_search.cpp , median_search.cpp , saddleback_search.cpp , sublist_search.cpp , ternary_search.cpp , text_search.cpp , bogo_sort.cpp , comb_sort.cpp , count_inversions.cpp , cycle_sort.cpp , dnf_sort.cpp , gnome_sort.cpp , heap_sort.cpp , insertion_sort.cpp , merge_insertion_sort.cpp , merge_sort.cpp , pancake_sort.cpp , pigeonhole_sort.cpp , quick_sort.cpp , quick_sort_3.cpp , radix_sort2.cpp , random_pivot_quick_sort.cpp , recursive_bubble_sort.cpp , selection_sort_recursive.cpp , shell_sort2.cpp , strand_sort.cpp , wave_sort.cpp , brute_force_string_searching.cpp , horspool.cpp , knuth_morris_pratt.cpp , manacher_algorithm.cpp , rabin_karp.cpp , z_function.cpp
mat_mul() : qr_eigen_values.cpp
max_subarray_sum() : kadanes3.cpp
merge() : merge_sort.cpp
diff --git a/globals_func_q.html b/globals_func_q.html
index b8a185378..8b5dd4f1e 100644
--- a/globals_func_q.html
+++ b/globals_func_q.html
@@ -93,6 +93,7 @@ $(document).ready(function(){initNavTree('globals_func_q.html',''); initResizabl
- q -
diff --git a/globals_func_t.html b/globals_func_t.html
index 45bf3b4c3..6cd8f8433 100644
--- a/globals_func_t.html
+++ b/globals_func_t.html
@@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('globals_func_t.html',''); initResizabl
- t -
ternary_search() : ternary_search.cpp
-test() : rat_maze.cpp , subarray_sum.cpp , subset_sum.cpp , wildcard_matching.cpp , count_of_trailing_ciphers_in_factorial_n.cpp , hamming_distance.cpp , caesar_cipher.cpp , elliptic_curve_key_exchange.cpp , morse_code.cpp , vigenere_cipher.cpp , xor_cipher.cpp , fcfs_scheduling.cpp , list_array.cpp , reverse_a_linked_list.cpp , sparse_table.cpp , trie_tree.cpp , trie_using_hashmap.cpp , karatsuba_algorithm_for_fast_multiplication.cpp , 0_1_knapsack.cpp , abbreviation.cpp , coin_change_topdown.cpp , cut_rod.cpp , house_robber.cpp , longest_increasing_subsequence.cpp , longest_palindromic_subsequence.cpp , minimum_edit_distance.cpp , palindrome_partitioning.cpp , shortest_common_supersequence.cpp , word_break.cpp , jarvis_algorithm.cpp , connected_components_with_dsu.cpp , is_graph_bipartite.cpp , jumpgame.cpp , md5.cpp , sha1.cpp , gram_schmidt.cpp , neural_network.cpp , armstrong_number.cpp , check_amicable_pair.cpp , double_factorial.cpp , fibonacci.cpp , fibonacci_matrix_exponentiation.cpp , fibonacci_sum.cpp , finding_number_of_digits_in_a_number.cpp , integral_approximation2.cpp , inv_sqrt.cpp , largest_power.cpp , lcm_sum.cpp , modular_division.cpp , modular_exponentiation.cpp , n_bonacci.cpp , n_choose_r.cpp , sum_of_binomial_coefficient.cpp , sum_of_digits.cpp , vector_cross_product.cpp , rungekutta.cpp , inorder_successor_of_bst.cpp , trie_multiple_search.cpp , kadanes3.cpp , smallest_circle.cpp , geometric_dist.cpp , windowed_median.cpp , persistent_seg_tree_lazy_prop.cpp , prefix_sum_array.cpp , floyd_cycle_detection_algo.cpp , median_search.cpp , saddleback_search.cpp , sublist_search.cpp , text_search.cpp , bogo_sort.cpp , count_inversions.cpp , cycle_sort.cpp , dnf_sort.cpp , gnome_sort.cpp , heap_sort.cpp , merge_insertion_sort.cpp , pancake_sort.cpp , random_pivot_quick_sort.cpp , recursive_bubble_sort.cpp , selection_sort_recursive.cpp , strand_sort.cpp , wave_sort.cpp , wiggle_sort.cpp , horspool.cpp , manacher_algorithm.cpp , z_function.cpp
+test() : rat_maze.cpp , subarray_sum.cpp , subset_sum.cpp , wildcard_matching.cpp , count_of_trailing_ciphers_in_factorial_n.cpp , hamming_distance.cpp , caesar_cipher.cpp , elliptic_curve_key_exchange.cpp , morse_code.cpp , vigenere_cipher.cpp , xor_cipher.cpp , fcfs_scheduling.cpp , list_array.cpp , reverse_a_linked_list.cpp , sparse_table.cpp , trie_tree.cpp , trie_using_hashmap.cpp , karatsuba_algorithm_for_fast_multiplication.cpp , 0_1_knapsack.cpp , abbreviation.cpp , coin_change_topdown.cpp , cut_rod.cpp , house_robber.cpp , longest_increasing_subsequence.cpp , longest_palindromic_subsequence.cpp , minimum_edit_distance.cpp , palindrome_partitioning.cpp , shortest_common_supersequence.cpp , word_break.cpp , jarvis_algorithm.cpp , connected_components_with_dsu.cpp , is_graph_bipartite.cpp , jumpgame.cpp , md5.cpp , sha1.cpp , gram_schmidt.cpp , neural_network.cpp , armstrong_number.cpp , check_amicable_pair.cpp , double_factorial.cpp , fibonacci.cpp , fibonacci_matrix_exponentiation.cpp , fibonacci_sum.cpp , finding_number_of_digits_in_a_number.cpp , integral_approximation2.cpp , inv_sqrt.cpp , largest_power.cpp , lcm_sum.cpp , modular_division.cpp , modular_exponentiation.cpp , n_bonacci.cpp , n_choose_r.cpp , sum_of_binomial_coefficient.cpp , sum_of_digits.cpp , vector_cross_product.cpp , rungekutta.cpp , inorder_successor_of_bst.cpp , trie_multiple_search.cpp , kadanes3.cpp , smallest_circle.cpp , geometric_dist.cpp , windowed_median.cpp , persistent_seg_tree_lazy_prop.cpp , prefix_sum_array.cpp , segtree.cpp , floyd_cycle_detection_algo.cpp , median_search.cpp , saddleback_search.cpp , sublist_search.cpp , text_search.cpp , bogo_sort.cpp , count_inversions.cpp , cycle_sort.cpp , dnf_sort.cpp , gnome_sort.cpp , heap_sort.cpp , merge_insertion_sort.cpp , pancake_sort.cpp , random_pivot_quick_sort.cpp , recursive_bubble_sort.cpp , selection_sort_recursive.cpp , strand_sort.cpp , wave_sort.cpp , wiggle_sort.cpp , horspool.cpp , manacher_algorithm.cpp , z_function.cpp
test1() : hill_cipher.cpp , tree_234.cpp , hamiltons_cycle.cpp , adaline_learning.cpp , kohonen_som_topology.cpp , kohonen_som_trace.cpp , large_factorial.cpp , sum_of_digits.cpp , brent_method_extrema.cpp , durand_kerner_roots.cpp , golden_search_extrema.cpp , lu_decompose.cpp , qr_eigen_values.cpp , iterative_tree_traversals.cpp
test2() : hill_cipher.cpp , tree_234.cpp , hamiltons_cycle.cpp , adaline_learning.cpp , kohonen_som_topology.cpp , kohonen_som_trace.cpp , large_factorial.cpp , sum_of_digits.cpp , brent_method_extrema.cpp , durand_kerner_roots.cpp , golden_search_extrema.cpp , lu_decompose.cpp , qr_eigen_values.cpp , iterative_tree_traversals.cpp , smallest_circle.cpp
test3() : hamiltons_cycle.cpp , adaline_learning.cpp , kohonen_som_topology.cpp , kohonen_som_trace.cpp , brent_method_extrema.cpp , golden_search_extrema.cpp , iterative_tree_traversals.cpp , smallest_circle.cpp
diff --git a/globals_func_u.html b/globals_func_u.html
index 88b0ebe6d..32a0e7620 100644
--- a/globals_func_u.html
+++ b/globals_func_u.html
@@ -96,6 +96,7 @@ $(document).ready(function(){initNavTree('globals_func_u.html',''); initResizabl
uint128_t_tests() : elliptic_curve_key_exchange.cpp
uint256_t_tests() : elliptic_curve_key_exchange.cpp
Union() : disjoint_set.cpp
+update() : segtree.cpp
update_step() : extended_euclid_algorithm.cpp
diff --git a/globals_m.html b/globals_m.html
index 5f9d060c4..ee4361ac3 100644
--- a/globals_m.html
+++ b/globals_m.html
@@ -93,7 +93,7 @@ $(document).ready(function(){initNavTree('globals_m.html',''); initResizable();
Here is a list of all documented file members with links to the documentation:
- m -