diff --git a/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.map b/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.map
new file mode 100644
index 000000000..5205c0415
--- /dev/null
+++ b/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.md5 b/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.md5
new file mode 100644
index 000000000..ad01d467c
--- /dev/null
+++ b/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.md5
@@ -0,0 +1 @@
+b28bd0aaeb6b9a8ada7979dc2b2ce620
\ No newline at end of file
diff --git a/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.svg b/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.svg
new file mode 100644
index 000000000..6b381c0cb
--- /dev/null
+++ b/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.svg
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+binary_search_tree< T >::bst_node
+
+
+
+Node1
+
+
+binary_search_tree
+< T >::bst_node
+
+
+
+
+
+Node2
+
+
+std::unique_ptr< binary
+_search_tree::bst_node >
+
+
+
+
+
+Node2->Node1
+
+
+ left
+right
+
+
+
diff --git a/d7/d1e/graph_2dijkstra_8cpp.html b/d7/d1e/graph_2dijkstra_8cpp.html
index fa24175dd..9b2bea3c6 100644
--- a/d7/d1e/graph_2dijkstra_8cpp.html
+++ b/d7/d1e/graph_2dijkstra_8cpp.html
@@ -204,7 +204,7 @@ constexpr int64_t INF
-
@@ -265,7 +265,7 @@ Here is the call graph for this function:
-
diff --git a/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.map b/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.map
index c41e44830..f6388fffb 100644
--- a/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.map
+++ b/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.map
@@ -1,12 +1,7 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.md5 b/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.md5
index 936ae66c3..c4c5978b9 100644
--- a/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.md5
+++ b/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.md5
@@ -1 +1 @@
-dfd47b69876fa92d0282ee35af978c54
\ No newline at end of file
+a9a5114fdc641ce208647b7c3c87be7f
\ No newline at end of file
diff --git a/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg b/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg
index e2be2fbce..2ca1a5216 100644
--- a/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg
+++ b/d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg
@@ -4,17 +4,17 @@
-
-
+
+
tests
-
+
Node1
-
-tests
+
+tests
@@ -22,138 +22,61 @@
Node2
-
-graph::addEdge
+
+graph::addEdge
Node1->Node2
-
-
+
+
Node3
-
-graph::dijkstra
+
+graph::dijkstra
Node1->Node3
-
-
+
+
-
-
-Node10
-
-
-std::endl
+
+
+Node5
+
+
+std::endl
-
-
-Node1->Node10
-
-
+
+
+Node1->Node5
+
+
Node4
-
-
-std::priority_queue
-::empty
+
+
+std::vector::size
Node3->Node4
-
-
-
-
-
-Node5
-
-
-std::make_pair
-
-
-
-
-
-Node3->Node5
-
-
-
-
-
-Node6
-
-
-std::priority_queue::pop
-
-
-
-
-
-Node3->Node6
-
-
-
-
-
-Node7
-
-
-std::priority_queue
-::push
-
-
-
-
-
-Node3->Node7
-
-
-
-
-
-Node8
-
-
-std::vector::size
-
-
-
-
-
-Node3->Node8
-
-
-
-
-
-Node9
-
-
-std::priority_queue::top
-
-
-
-
-
-Node3->Node9
-
-
+
+
diff --git a/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
index bae21166e..c67830b82 100644
--- a/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
+++ b/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -1,13 +1,8 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
index 819be6681..e80a1e84d 100644
--- a/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
+++ b/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -1 +1 @@
-dab6a49121b6c8c729a68f4d5cd3daf5
\ No newline at end of file
+908c206fcb1ad75479951361066af7e2
\ No newline at end of file
diff --git a/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
index f85b2718c..f6cfb2078 100644
--- a/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
+++ b/d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -4,17 +4,17 @@
-
-
+
+
main
-
+
Node1
-
-main
+
+main
@@ -22,171 +22,94 @@
Node2
-
-graph::addEdge
+
+graph::addEdge
Node1->Node2
-
-
+
+
Node3
-
-graph::dijkstra
+
+graph::dijkstra
Node1->Node3
-
-
+
+
-
-
-Node10
-
-
-std::endl
+
+
+Node5
+
+
+std::endl
-
-
-Node1->Node10
-
-
+
+
+Node1->Node5
+
+
-
-
-Node11
-
-
-tests
+
+
+Node6
+
+
+tests
-
-
-Node1->Node11
-
-
+
+
+Node1->Node6
+
+
Node4
-
-
-std::priority_queue
-::empty
+
+
+std::vector::size
Node3->Node4
-
-
+
+
-
-
-Node5
-
-
-std::make_pair
-
-
-
-
-
-Node3->Node5
-
-
-
-
-
-Node6
-
-
-std::priority_queue::pop
-
-
-
-
-
-Node3->Node6
-
-
-
-
-
-Node7
-
-
-std::priority_queue
-::push
-
-
-
-
+
-Node3->Node7
-
-
+Node6->Node2
+
+
-
-
-Node8
-
-
-std::vector::size
-
-
-
-
+
-Node3->Node8
-
-
+Node6->Node3
+
+
-
-
-Node9
-
-
-std::priority_queue::top
-
-
-
-
+
-Node3->Node9
-
-
-
-
-
-Node11->Node2
-
-
-
-
-
-Node11->Node3
-
-
-
-
-
-Node11->Node10
-
-
+Node6->Node5
+
+
diff --git a/d8/da7/namespacedepth__first__search.html b/d8/da7/namespacedepth__first__search.html
new file mode 100644
index 000000000..336d1aebe
--- /dev/null
+++ b/d8/da7/namespacedepth__first__search.html
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: depth_first_search Namespace Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Functions for Depth First Search algorithm.
+More...
+
+
Functions for Depth First Search algorithm.
+
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree.html b/d9/dde/classbinary__search__tree.html
new file mode 100644
index 000000000..b78d3a871
--- /dev/null
+++ b/d9/dde/classbinary__search__tree.html
@@ -0,0 +1,1201 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: binary_search_tree< T > Class Template Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Binary Search Tree class.
+ More...
+
+
+
+
+struct bst_node
+ A struct to represent a node in the Binary Search Tree. More...
+
+
+
+
template<class T>
+class binary_search_tree< T >
+
+
The Binary Search Tree class.
+
Template Parameters
+
+ T The type of the binary search tree key.
+
+
+
+
+
+
◆ contains() [1/2]
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline private
+
+
+
+
+
Recursive function to check if a value is in the BST.
+
Parameters
+
+ node The node to search from.
+ value The value to find.
+
+
+
+
Returns true If the value was found in the BST.
+
+false Otherwise.
+
+
+
+
+
+
181 if (value < node->value) {
+
+
183 }
else if (value >
node ->value) {
+
+
+
+
+
+
bool contains(std::unique_ptr< bst_node > &node, T value)
Recursive function to check if a value is in the BST.
Definition: binary_search_tree2.cpp:176
+
Definition: avltree.cpp:13
+
+
+
+
+
◆ contains() [2/2]
+
+
+
+
+template<class T >
+
+
+
+
Check if a value is in the BST.
+
Parameters
+
+ value The value to find.
+
+
+
+
Returns true If value is in the BST.
+
+false Otherwise.
+
+
std::unique_ptr< bst_node > root_
Definition: binary_search_tree2.cpp:41
+
+
+
+
+
+
+
◆ find_max() [1/2]
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline private
+
+
+
+
+
Recursive function to find the maximum value in the BST.
+
Parameters
+
+ node The node to search from.
+ ret_value Variable to hold the maximum value.
+
+
+
+
Returns true If the maximum value was successfully found.
+
+false Otherwise.
+
+
+
+
55 }
else if (!
node ->right) {
+
56 ret_value =
node ->value;
+
+
+
+
+
bool find_max(std::unique_ptr< bst_node > &node, T &ret_value)
Recursive function to find the maximum value in the BST.
Definition: binary_search_tree2.cpp:52
+
+
+
+
+
◆ find_max() [2/2]
+
+
+
+
+template<class T >
+
+
+
+
Find the largest value in the BST.
+
Parameters
+
+ ret_value Variable to hold the maximum value.
+
+
+
+
Returns true If maximum value was successfully found.
+
+false Otherwise.
+
+
+
+
+
+
+
◆ find_min() [1/2]
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline private
+
+
+
+
+
Recursive function to find the minimum value in the BST.
+
Parameters
+
+ node The node to search from.
+ ret_value Variable to hold the minimum value.
+
+
+
+
Returns true If the minimum value was successfully found.
+
+false Otherwise.
+
+
+
+
73 }
else if (!
node ->left) {
+
74 ret_value =
node ->value;
+
+
+
+
+
+
bool find_min(std::unique_ptr< bst_node > &node, T &ret_value)
Recursive function to find the minimum value in the BST.
Definition: binary_search_tree2.cpp:70
+
+
+
+
+
◆ find_min() [2/2]
+
+
+
+
+template<class T >
+
+
+
+
Find the smallest value in the BST.
+
Parameters
+
+ ret_value Variable to hold the minimum value.
+
+
+
+
Returns true If minimum value was successfully found.
+
+false Otherwise.
+
+
+
+
+
+
+
◆ get_elements_inorder()
+
+
+
+
+template<class T >
+
+
+
+
Get all values of the BST in in-order order.
+
Returns std::vector<T> List of values, sorted in in-order order.
+
+
+
+
+
+
+
void traverse_inorder(std::function< void(T)> callback, std::unique_ptr< bst_node > &node)
Recursive function to traverse the tree in in-order order.
Definition: binary_search_tree2.cpp:196
+
uint64_t result(uint64_t n)
Definition: fibonacci_sum.cpp:76
+
+
+
+
+
+
+
+
◆ get_elements_postorder()
+
+
+
+
+template<class T >
+
+
+
+
Get all values of the BST in post-order order.
+
Returns std::vector<T> List of values, sorted in post-order order.
+
+
+
+
+
+
+
void traverse_postorder(std::function< void(T)> callback, std::unique_ptr< bst_node > &node)
Recursive function to traverse the tree in post-order order.
Definition: binary_search_tree2.cpp:230
+
+
+
+
+
+
+
◆ get_elements_preorder()
+
+
+
+
+template<class T >
+
+
+
+
Get all values of the BST in pre-order order.
+
Returns std::vector<T> List of values, sorted in pre-order order.
+
+
+
+
+
+
+
void traverse_preorder(std::function< void(T)> callback, std::unique_ptr< bst_node > &node)
Recursive function to traverse the tree in pre-order order.
Definition: binary_search_tree2.cpp:213
+
+
+
+
+
+
+
◆ insert() [1/2]
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline private
+
+
+
+
+
Recursive function to insert a value into the BST.
+
Parameters
+
+ node The node to search from.
+ new_value The value to insert.
+
+
+
+
Returns true If the insert operation was successful.
+
+false Otherwise.
+
+
+
+
+
+
+
95 if (new_value < node->value) {
+
+
+
+
+
+
+
102 }
else if (new_value >
node ->value) {
+
+
+
+
+
+
+
+
+
+
+
+
bool insert(std::unique_ptr< bst_node > &node, T new_value)
Recursive function to insert a value into the BST.
Definition: binary_search_tree2.cpp:89
+
+
+
+
+
+
◆ insert() [2/2]
+
+
+
+
+template<class T >
+
+
+
+
Insert a new value into the BST.
+
Parameters
+
+ new_value The value to insert into the BST.
+
+
+
+
Returns true If the insertion was successful.
+
+false Otherwise.
+
+
+
+
+
+
+
+
std::size_t size_
Definition: binary_search_tree2.cpp:42
+
+
+
+
+
+
+
◆ remove() [1/2]
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline private
+
+
+
+
+
Recursive function to remove a value from the BST.
+
Parameters
+
+ parent The parent node of node.
+ node The node to search from.
+ rm_value The value to remove.
+
+
+
+
Returns true If the removal operation was successful.
+
+false Otherwise.
+
+
+
+
+
+
130 if (
node ->value == rm_value) {
+
+
132 T successor_node_value{};
+
+
+
135 node ->value = successor_node_value;
+
+
137 }
else if (
node ->left ||
node ->right) {
+
+
+
+
+
+
143 }
else if (rm_value < parent->value) {
+
+
+
+
+
+
+
+
+
152 root_ .reset(
nullptr );
+
153 }
else if (rm_value < parent->value) {
+
154 parent->left.reset(
nullptr );
+
+
156 parent->right.reset(
nullptr );
+
+
+
+
+
161 }
else if (rm_value < node->value) {
+
+
+
+
+
+
bool remove(std::unique_ptr< bst_node > &parent, std::unique_ptr< bst_node > &node, T rm_value)
Recursive function to remove a value from the BST.
Definition: binary_search_tree2.cpp:124
+
+
+
+
+
+
◆ remove() [2/2]
+
+
+
+
+template<class T >
+
+
+
+
Remove a specified value from the BST.
+
Parameters
+
+ rm_value The value to remove.
+
+
+
+
Returns true If the removal was successful.
+
+false Otherwise.
+
+
+
+
+
+
+
◆ size()
+
+
+
+
+template<class T >
+
+
+
+
Get the number of values in the BST.
+
Returns std::size_t Number of values in the BST.
+
+
+
+
+
◆ traverse_inorder()
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline private
+
+
+
+
+
Recursive function to traverse the tree in in-order order.
+
Parameters
+
+ callback Function that is called when a value needs to processed.
+ node The node to traverse from.
+
+
+
+
+
+
+
+
+
+
203 callback(
node ->value);
+
+
+
+
+
+
+
◆ traverse_postorder()
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline private
+
+
+
+
+
Recursive function to traverse the tree in post-order order.
+
Parameters
+
+ callback Function that is called when a value needs to processed.
+ node The node to traverse from.
+
+
+
+
+
+
+
+
+
+
+
238 callback(
node ->value);
+
+
+
+
+
+
◆ traverse_preorder()
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline private
+
+
+
+
+
Recursive function to traverse the tree in pre-order order.
+
Parameters
+
+ callback Function that is called when a value needs to processed.
+ node The node to traverse from.
+
+
+
+
+
+
+
+
+
219 callback(
node ->value);
+
+
+
+
+
+
+
+
+
◆ root_
+
+
+
+
+template<class T >
+
+
+
Pointer to the root of the BST.
+
+
+
+
+
◆ size_
+
+
+
+
+template<class T >
+
+
+
Number of elements/nodes in the BST.
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree.js b/d9/dde/classbinary__search__tree.js
new file mode 100644
index 000000000..956b8df98
--- /dev/null
+++ b/d9/dde/classbinary__search__tree.js
@@ -0,0 +1,24 @@
+var classbinary__search__tree =
+[
+ [ "bst_node", "dd/db6/structbinary__search__tree_1_1bst__node.html", "dd/db6/structbinary__search__tree_1_1bst__node" ],
+ [ "binary_search_tree", "d9/dde/classbinary__search__tree.html#aa67321ed575ca313cd71d833d91234a6", null ],
+ [ "contains", "d9/dde/classbinary__search__tree.html#aa4f84b2eec9b9201af1840868ddb5fb2", null ],
+ [ "contains", "d9/dde/classbinary__search__tree.html#a6bf5b410299df2320ddf2709dda61f63", null ],
+ [ "find_max", "d9/dde/classbinary__search__tree.html#a75f897af6aa732a9901454401c869bcb", null ],
+ [ "find_max", "d9/dde/classbinary__search__tree.html#a42b16f26928b5e994925100594a167a0", null ],
+ [ "find_min", "d9/dde/classbinary__search__tree.html#af9a2c7c187a7ca3142c77ce342ef3153", null ],
+ [ "find_min", "d9/dde/classbinary__search__tree.html#ad9912e8574538e86f9bd2c38e7e63d03", null ],
+ [ "get_elements_inorder", "d9/dde/classbinary__search__tree.html#a06a863442c165503ac189f7b47599ec8", null ],
+ [ "get_elements_postorder", "d9/dde/classbinary__search__tree.html#a70030b0d7990c6fd450256d27b8f6c7b", null ],
+ [ "get_elements_preorder", "d9/dde/classbinary__search__tree.html#a53d1bf8e5ef0a952d2817f3cd22546c7", null ],
+ [ "insert", "d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778", null ],
+ [ "insert", "d9/dde/classbinary__search__tree.html#a8168edf29316f2b436eac1fc416c52e0", null ],
+ [ "remove", "d9/dde/classbinary__search__tree.html#af4a865ce5244608819b169fc78a41153", null ],
+ [ "remove", "d9/dde/classbinary__search__tree.html#a99771c2e1353e8ddfd4bb9d30b7a98fb", null ],
+ [ "size", "d9/dde/classbinary__search__tree.html#a564fe43e7e8f7ecb6f10667a70fbc6f3", null ],
+ [ "traverse_inorder", "d9/dde/classbinary__search__tree.html#a2fcf37549bd002c174a45b0b4203c2bd", null ],
+ [ "traverse_postorder", "d9/dde/classbinary__search__tree.html#a87c0a35845d27e0f6fc1f4eaa0333362", null ],
+ [ "traverse_preorder", "d9/dde/classbinary__search__tree.html#ab81edd415324d372632c42dc7dbcb9e1", null ],
+ [ "root_", "d9/dde/classbinary__search__tree.html#aa08f65f6f3bfcb14f8c3d1e65305ae50", null ],
+ [ "size_", "d9/dde/classbinary__search__tree.html#a07ba32ce1a2af6e357600ac8c8e98dbc", null ]
+];
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.map b/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.map
new file mode 100644
index 000000000..329267adb
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.md5 b/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.md5
new file mode 100644
index 000000000..e4ad11544
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.md5
@@ -0,0 +1 @@
+d1f5d006e9ae2ea64ad70aaebac46211
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.svg b/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.svg
new file mode 100644
index 000000000..0672995f4
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a06a863442c165503ac189f7b47599ec8_cgraph.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+binary_search_tree::get_elements_inorder
+
+
+
+Node1
+
+
+binary_search_tree
+::get_elements_inorder
+
+
+
+
+
+Node2
+
+
+binary_search_tree
+::traverse_inorder
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.map b/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.map
new file mode 100644
index 000000000..52cb91564
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.md5 b/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.md5
new file mode 100644
index 000000000..aec931a1c
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.md5
@@ -0,0 +1 @@
+566f86935c350cfc065e984de21bf34c
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.svg b/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.svg
new file mode 100644
index 000000000..36cfad9c8
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a42b16f26928b5e994925100594a167a0_cgraph.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+binary_search_tree::find_max
+
+
+
+Node1
+
+
+binary_search_tree
+::find_max
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.map b/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.map
new file mode 100644
index 000000000..9c05e3ead
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.md5 b/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.md5
new file mode 100644
index 000000000..1c9227857
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.md5
@@ -0,0 +1 @@
+12831057e01a06db24ceefd26e0eff15
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.svg b/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.svg
new file mode 100644
index 000000000..7f761e54a
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a53d1bf8e5ef0a952d2817f3cd22546c7_cgraph.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+binary_search_tree::get_elements_preorder
+
+
+
+Node1
+
+
+binary_search_tree
+::get_elements_preorder
+
+
+
+
+
+Node2
+
+
+binary_search_tree
+::traverse_preorder
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.map b/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.map
new file mode 100644
index 000000000..9d4375321
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.md5 b/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.md5
new file mode 100644
index 000000000..4d52a58a9
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.md5
@@ -0,0 +1 @@
+36fccb04fe1017b859f0fcf0f926d23a
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.svg b/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.svg
new file mode 100644
index 000000000..cad8f53a8
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a6bf5b410299df2320ddf2709dda61f63_cgraph.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+binary_search_tree::contains
+
+
+
+Node1
+
+
+binary_search_tree
+::contains
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.map b/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.map
new file mode 100644
index 000000000..69ed72d72
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.md5 b/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.md5
new file mode 100644
index 000000000..f79fe514a
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.md5
@@ -0,0 +1 @@
+3483d7ab6a220762ed15a7e877fe0eb6
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.svg b/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.svg
new file mode 100644
index 000000000..77bb6f453
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a70030b0d7990c6fd450256d27b8f6c7b_cgraph.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+binary_search_tree::get_elements_postorder
+
+
+
+Node1
+
+
+binary_search_tree
+::get_elements_postorder
+
+
+
+
+
+Node2
+
+
+binary_search_tree
+::traverse_postorder
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.map b/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.map
new file mode 100644
index 000000000..e1c9d358c
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.md5 b/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.md5
new file mode 100644
index 000000000..2324f59a4
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.md5
@@ -0,0 +1 @@
+5b0aa79e27e8ba699c5dde35c3d5199d
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.svg b/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.svg
new file mode 100644
index 000000000..b1c1a8769
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a8168edf29316f2b436eac1fc416c52e0_cgraph.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+binary_search_tree::insert
+
+
+
+Node1
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node2
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.map b/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.map
new file mode 100644
index 000000000..3938b3260
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.md5 b/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.md5
new file mode 100644
index 000000000..3d61fafee
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.md5
@@ -0,0 +1 @@
+b6ae2dee1e102bf9d1b4583e33c61cec
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.svg b/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.svg
new file mode 100644
index 000000000..69717d25e
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_a99771c2e1353e8ddfd4bb9d30b7a98fb_cgraph.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+binary_search_tree::remove
+
+
+
+Node1
+
+
+binary_search_tree
+::remove
+
+
+
+
+
+Node2
+
+
+binary_search_tree
+::remove
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
diff --git a/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.map b/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.map
new file mode 100644
index 000000000..a8e525e3e
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.md5 b/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.md5
new file mode 100644
index 000000000..170fe743a
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.md5
@@ -0,0 +1 @@
+04e16eed1881694be56e6d627213816b
\ No newline at end of file
diff --git a/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.svg b/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.svg
new file mode 100644
index 000000000..2778f49fa
--- /dev/null
+++ b/d9/dde/classbinary__search__tree_ad9912e8574538e86f9bd2c38e7e63d03_cgraph.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+binary_search_tree::find_min
+
+
+
+Node1
+
+
+binary_search_tree
+::find_min
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/da/d4b/depth__first__search__with__stack_8cpp.html b/da/d4b/depth__first__search__with__stack_8cpp.html
new file mode 100644
index 000000000..159d1c79d
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp.html
@@ -0,0 +1,513 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: graph/depth_first_search_with_stack.cpp File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Depth First Search Algorithm using Stack (Depth First Search Algorithm)
+More...
+
#include <iostream>
+#include <stack>
+#include <vector>
+#include <cassert>
+#include <limits>
+
+
+constexpr int WHITE = 0
+
+
+constexpr int GREY = 1
+ indicates the node hasn't been explored
+
+
+constexpr int BLACK = 2
+ indicates node is in stack waiting to be explored
+
+
+constexpr int64_t INF = std::numeric_limits <int16_t>::max()
+ indicates node has already been explored
+
+
+
+
Depth First Search Algorithm using Stack (Depth First Search Algorithm)
+
Author Ayaan Khan
+
+Saurav Uppoor
+
Depth First Search also quoted as DFS is a Graph Traversal Algorithm. Time Complexity O(|V| + |E|) where V is number of vertices and E is number of edges in graph.
+
Application of Depth First Search are
+
+Finding connected components
+Finding 2-(edge or vertex)-connected components.
+Finding 3-(edge or vertex)-connected components.
+Finding the bridges of a graph.
+Generating words in order to plot the limit set of a group.
+Finding strongly connected components.
+
+
Working
+
+Mark all vertices as unvisited (colour it WHITE).
+Push starting vertex into the stack and colour it GREY.
+Once a node is popped out of the stack and is coloured GREY, we colour it BLACK.
+Push all its neighbours which are not coloured BLACK.
+Repeat steps 4 and 5 until the stack is empty.
+
+
+
+
◆ addEdge()
+
+
+
+
+
+ void graph::depth_first_search::addEdge
+ (
+ std::vector < std::vector < size_t >> *
+ adj ,
+
+
+
+
+ size_t
+ u ,
+
+
+
+
+ size_t
+ v
+
+
+
+ )
+
+
+
+
+
+
Adds and edge between two vertices of graph say u and v in this case.
+
Parameters
+
+ adj Adjacency list representation of graph
+ u first vertex
+ v second vertex
+
+
+
+
+
+
+
+
+
+
+
+
72 (*adj)[u - 1].push_back(v - 1);
+
+
+
+
+
+
◆ dfs()
+
+
+
+
+
Explores the given vertex, exploring a vertex means traversing over all the vertices which are connected to the vertex that is currently being explored and push it onto the stack.
+
Parameters
+
+ adj graph
+ start starting vertex for DFS
+
+
+
+
Returns vector with nodes stored in the order of DFS traversal
+
checked[i] stores the status of each node
+
while stack is not empty we keep exploring the node on top of stack
+
push the node to the final result vector
+
exploring the neighbours of the current node
+
Node has been explored
+
+
+
+
+
91 checked[start] =
GREY ;
+
+
+
+
+
96 while (!
stack .empty()) {
+
+
+
+
100 if (checked[act] ==
GREY ) {
+
+
+
+
+
105 for (
auto it :
graph [act]) {
+
+
107 if (checked[it] !=
BLACK ) {
+
+
+
+
111 checked[act] =
BLACK ;
+
+
+
114 return traversed_path;
+
+
+
Type top()
Definition: stack.h:93
+
void push(Type item)
Definition: stack.h:83
+
void pop()
Definition: stack.h:99
+
constexpr int GREY
indicates the node hasn't been explored
Definition: depth_first_search_with_stack.cpp:39
+
constexpr int BLACK
indicates node is in stack waiting to be explored
Definition: depth_first_search_with_stack.cpp:40
+
constexpr int WHITE
Definition: depth_first_search_with_stack.cpp:38
+
+
char stack[MAX]
Definition: paranthesis_matching.cpp:20
+
+
+
+
+
+
+
+
+
+
◆ main()
+
+
+
+
+
+ int main
+ (
+ void
+ )
+
+
+
+
+
+
Main function.
+
Returns 0 on exit
+
creating a graph
+
taking input for the edges
+
taking input for the starting position
+
Printing the order of traversal
+
+
+
+
176 size_t vertices = 0, edges = 0, start_pos = 1;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
202 for (
auto x : traversal) {
+
+
+
+
+
+
+
+
static void tests()
Definition: depth_first_search_with_stack.cpp:123
+
void addEdge(std::vector< std::vector< size_t >> *adj, size_t u, size_t v)
Adds and edge between two vertices of graph say u and v in this case.
Definition: depth_first_search_with_stack.cpp:64
+
std::vector< size_t > dfs(const std::vector< std::vector< size_t > > &graph, size_t start)
Explores the given vertex, exploring a vertex means traversing over all the vertices which are connec...
Definition: depth_first_search_with_stack.cpp:87
+
+
+
+
+
+
+
+
◆ tests()
+
+
+
+
+
+
+
+
+ static void tests
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
Self-test implementations
Returns none
+
Test 1
+
for the above sample data, this is the expected output
+
Test 2
+
for the above sample data, this is the expected output
+
Test 3
+
for the above sample data, this is the expected output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
136 assert(graph::depth_first_search::dfs(g1, start_pos - 1) == expected1);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
150 assert(graph::depth_first_search::dfs(g2, start_pos - 1) == expected2);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
164 assert(graph::depth_first_search::dfs(g3, start_pos - 1) == expected3);
+
+
+
+
+
+
+
+
+
+
+
◆ WHITE
+
+
+
+
+
+
+
+
+ constexpr int WHITE = 0
+
+
+
+
+constexpr
+
+
+
+
for IO operations header for std::stack header for std::vector header for preprocessor macro assert() header for limits of integral types
+
+
+
+
+
+
+
+
+
diff --git a/da/d4b/depth__first__search__with__stack_8cpp.js b/da/d4b/depth__first__search__with__stack_8cpp.js
new file mode 100644
index 000000000..8cc6841ba
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp.js
@@ -0,0 +1,11 @@
+var depth__first__search__with__stack_8cpp =
+[
+ [ "addEdge", "da/d4b/depth__first__search__with__stack_8cpp.html#a7511fcdb330b3ab599ff9e15229ae068", null ],
+ [ "dfs", "da/d4b/depth__first__search__with__stack_8cpp.html#ae198aeaad22ccd56712b7380bd62f777", null ],
+ [ "main", "da/d4b/depth__first__search__with__stack_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
+ [ "tests", "da/d4b/depth__first__search__with__stack_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e", null ],
+ [ "BLACK", "da/d4b/depth__first__search__with__stack_8cpp.html#a7f1cd94cf4da32933e8551cb3577e18b", null ],
+ [ "GREY", "da/d4b/depth__first__search__with__stack_8cpp.html#a43e30173f12330e85cce6239a277527e", null ],
+ [ "INF", "da/d4b/depth__first__search__with__stack_8cpp.html#a330a2b0a904f01802ada1f8f3b28e76c", null ],
+ [ "WHITE", "da/d4b/depth__first__search__with__stack_8cpp.html#afb80b42b42381658a12a57a975ecd0c7", null ]
+];
\ No newline at end of file
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.map b/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.map
new file mode 100644
index 000000000..f52c24baf
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.md5 b/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.md5
new file mode 100644
index 000000000..8b3898fad
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.md5
@@ -0,0 +1 @@
+4f703bcdd25f0ee1bcb2525ee66905d0
\ No newline at end of file
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg b/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg
new file mode 100644
index 000000000..5db0f8d2c
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+tests
+
+
+
+Node1
+
+
+tests
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.map b/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.map
new file mode 100644
index 000000000..3eea0c5a6
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.map
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.md5 b/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.md5
new file mode 100644
index 000000000..0cac38dd9
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.md5
@@ -0,0 +1 @@
+d874023f150d00ee467da5fbf3763964
\ No newline at end of file
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.svg b/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.svg
new file mode 100644
index 000000000..4de1dfa74
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_ae198aeaad22ccd56712b7380bd62f777_cgraph.svg
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+graph::depth_first_search::dfs
+
+
+
+Node1
+
+
+graph::depth_first
+_search::dfs
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+stack::pop
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node5
+
+
+stack::push
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node6
+
+
+std::vector::push_back
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
+Node7
+
+
+stack::top
+
+
+
+
+
+Node1->Node7
+
+
+
+
+
+Node3
+
+
+std::endl
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+Node4
+
+
+stack::isEmptyStack
+
+
+
+
+
+Node2->Node4
+
+
+
+
+
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
new file mode 100644
index 000000000..56c943b60
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
new file mode 100644
index 000000000..cf1d83b06
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -0,0 +1 @@
+9c40f79556f7f979646b6492bbd3d097
\ No newline at end of file
diff --git a/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
new file mode 100644
index 000000000..22394ae92
--- /dev/null
+++ b/da/d4b/depth__first__search__with__stack_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+main
+
+
+
+Node1
+
+
+main
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+tests
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node3->Node2
+
+
+
+
+
diff --git a/da/dfa/structbinary__search__tree_1_1bst__node-members.html b/da/dfa/structbinary__search__tree_1_1bst__node-members.html
new file mode 100644
index 000000000..280d1e8f3
--- /dev/null
+++ b/da/dfa/structbinary__search__tree_1_1bst__node-members.html
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This is the complete list of members for binary_search_tree< T >::bst_node , including all inherited members.
+
+
+
+
+
+
diff --git a/dd/db6/structbinary__search__tree_1_1bst__node.html b/dd/db6/structbinary__search__tree_1_1bst__node.html
new file mode 100644
index 000000000..3463e8927
--- /dev/null
+++ b/dd/db6/structbinary__search__tree_1_1bst__node.html
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: binary_search_tree< T >::bst_node Struct Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A struct to represent a node in the Binary Search Tree.
+ More...
+
+
+
+
+
template<class T>
+struct binary_search_tree< T >::bst_node
+
+
A struct to represent a node in the Binary Search Tree.
+
+
+
◆ bst_node()
+
+
+
+
+template<class T >
+
+
+
+
+
+
+inline explicit
+
+
+
+
Constructor for bst_node , used to simplify node construction and smart pointer construction.
Parameters
+
+ _value The value of the constructed node.
+
+
+
+
+
+
+
+
+
std::unique_ptr< bst_node > right
Definition: binary_search_tree2.cpp:27
+
T value
Definition: binary_search_tree2.cpp:25
+
std::unique_ptr< bst_node > left
Definition: binary_search_tree2.cpp:26
+
+
+
+
+
+
◆ left
+
+
+
+
+template<class T >
+
+
+
Pointer to left subtree.
+
+
+
+
+
◆ right
+
+
+
+
+template<class T >
+
+
+
Pointer to right subtree.
+
+
+
+
+
◆ value
+
+
+
+
+template<class T >
+
+
+
The value/key of the node.
+
+
+
+
The documentation for this struct was generated from the following file:
+
+
+
+
+
+
diff --git a/dd/db6/structbinary__search__tree_1_1bst__node.js b/dd/db6/structbinary__search__tree_1_1bst__node.js
new file mode 100644
index 000000000..84e43e1b2
--- /dev/null
+++ b/dd/db6/structbinary__search__tree_1_1bst__node.js
@@ -0,0 +1,7 @@
+var structbinary__search__tree_1_1bst__node =
+[
+ [ "bst_node", "dd/db6/structbinary__search__tree_1_1bst__node.html#a51dd9bd6dd32bce3b74dd64557306778", null ],
+ [ "left", "dd/db6/structbinary__search__tree_1_1bst__node.html#a55c165b9e0e5b50a23104e0604dcc788", null ],
+ [ "right", "dd/db6/structbinary__search__tree_1_1bst__node.html#a05f3a7aa6c31622f855ce4b5a95e91df", null ],
+ [ "value", "dd/db6/structbinary__search__tree_1_1bst__node.html#a09da9e5b801ede4764bc812975ff7f29", null ]
+];
\ No newline at end of file
diff --git a/de/d33/binary__search__tree2_8cpp__incl.map b/de/d33/binary__search__tree2_8cpp__incl.map
new file mode 100644
index 000000000..b9425e66e
--- /dev/null
+++ b/de/d33/binary__search__tree2_8cpp__incl.map
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/de/d33/binary__search__tree2_8cpp__incl.md5 b/de/d33/binary__search__tree2_8cpp__incl.md5
new file mode 100644
index 000000000..a1df3f632
--- /dev/null
+++ b/de/d33/binary__search__tree2_8cpp__incl.md5
@@ -0,0 +1 @@
+bdec2ac38c49dbe16a7261b87590beee
\ No newline at end of file
diff --git a/de/d33/binary__search__tree2_8cpp__incl.svg b/de/d33/binary__search__tree2_8cpp__incl.svg
new file mode 100644
index 000000000..a64b44f47
--- /dev/null
+++ b/de/d33/binary__search__tree2_8cpp__incl.svg
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+data_structures/binary_search_tree2.cpp
+
+
+
+Node1
+
+
+data_structures/binary
+_search_tree2.cpp
+
+
+
+
+
+Node2
+
+
+cassert
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+functional
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+iostream
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+memory
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node6
+
+
+vector
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp.html b/df/d42/binary__search__tree2_8cpp.html
new file mode 100644
index 000000000..f4355cbbd
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp.html
@@ -0,0 +1,610 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: data_structures/binary_search_tree2.cpp File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A generic binary search tree implementation.
+More...
+
#include <cassert>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <vector>
+
+
+
+
+
◆ test_contains()
+
+
+
+
+
+
+
+
+ static void test_contains
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Function for testing contains().
+
Returns void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Binary Search Tree class.
Definition: binary_search_tree2.cpp:19
+
bool insert(std::unique_ptr< bst_node > &node, T new_value)
Recursive function to insert a value into the BST.
Definition: binary_search_tree2.cpp:89
+
bool contains(std::unique_ptr< bst_node > &node, T value)
Recursive function to check if a value is in the BST.
Definition: binary_search_tree2.cpp:176
+
+
+
+
+
+
+
+
◆ test_find_max()
+
+
+
+
+
+
+
+
+ static void test_find_max
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Function for testing find_max().
+
Returns void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
bool find_max(std::unique_ptr< bst_node > &node, T &ret_value)
Recursive function to find the maximum value in the BST.
Definition: binary_search_tree2.cpp:52
+
+
+
+
+
+
+
+
◆ test_find_min()
+
+
+
+
+
+
+
+
+ static void test_find_min
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Function for testing find_min().
+
Returns void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
bool find_min(std::unique_ptr< bst_node > &node, T &ret_value)
Recursive function to find the minimum value in the BST.
Definition: binary_search_tree2.cpp:70
+
+
+
+
+
+
+
+
◆ test_get_elements_inorder()
+
+
+
+
+
+
+
+
+ static void test_get_elements_inorder
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Function for testing get_elements_inorder().
+
Returns void
+
+
498 std::cout <<
"Testing BST get_elements_inorder..." ;
+
+
+
+
+
+
+
+
+
+
508 assert(actual == expected);
+
+
+
+
std::vector< T > get_elements_inorder()
Get all values of the BST in in-order order.
Definition: binary_search_tree2.cpp:320
+
+
+
+
+
+
+
+
◆ test_get_elements_postorder()
+
+
+
+
+
+
+
+
+ static void test_get_elements_postorder
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Function for testing get_elements_postorder().
+
Returns void
+
+
540 std::cout <<
"Testing BST get_elements_postorder..." ;
+
+
+
+
+
+
+
+
+
+
550 assert(actual == expected);
+
+
+
+
std::vector< T > get_elements_postorder()
Get all values of the BST in post-order order.
Definition: binary_search_tree2.cpp:344
+
+
+
+
+
+
+
◆ test_get_elements_preorder()
+
+
+
+
+
+
+
+
+ static void test_get_elements_preorder
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Function for testing get_elements_preorder().
+
Returns void
+
+
519 std::cout <<
"Testing BST get_elements_preorder..." ;
+
+
+
+
+
+
+
+
+
+
529 assert(actual == expected);
+
+
+
+
std::vector< T > get_elements_preorder()
Get all values of the BST in pre-order order.
Definition: binary_search_tree2.cpp:332
+
+
+
+
+
+
+
◆ test_insert()
+
+
+
+
+
+
+
+
+ static void test_insert
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Function for testing insert() .
+
Returns void
+
+
+
+
+
361 bool res = tree.
insert (5);
+
+
+
+
+
+
+
368 assert(tree.
size () == 1);
+
+
+
+
+
+
+
+
+
377 assert(tree.
size () == 4);
+
+
379 bool fail_res = tree.
insert (4);
+
+
381 assert(tree.
size () == 4);
+
+
+
+
std::size_t size()
Get the number of values in the BST.
Definition: binary_search_tree2.cpp:313
+
+
+
+
+
+
+
◆ test_remove()
+
+
+
+
+
+
+
+
+ static void test_remove
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
Function for testing remove() .
+
Returns void
+
+
+
+
+
+
+
+
+
+
400 bool res = tree.
remove (5);
+
+
+
+
+
+
+
407 assert(tree.
size () == 3);
+
+
+
+
+
+
413 assert(tree.
size () == 0);
+
+
+
416 bool fail_res = tree.
remove (5);
+
+
418 assert(tree.
size () == 0);
+
+
+
+
bool remove(std::unique_ptr< bst_node > &parent, std::unique_ptr< bst_node > &node, T rm_value)
Recursive function to remove a value from the BST.
Definition: binary_search_tree2.cpp:124
+
+
+
+
+
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp.js b/df/d42/binary__search__tree2_8cpp.js
new file mode 100644
index 000000000..8e80f285c
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp.js
@@ -0,0 +1,14 @@
+var binary__search__tree2_8cpp =
+[
+ [ "binary_search_tree", "d9/dde/classbinary__search__tree.html", "d9/dde/classbinary__search__tree" ],
+ [ "bst_node", "dd/db6/structbinary__search__tree_1_1bst__node.html", "dd/db6/structbinary__search__tree_1_1bst__node" ],
+ [ "main", "df/d42/binary__search__tree2_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
+ [ "test_contains", "df/d42/binary__search__tree2_8cpp.html#a1d42876440ac5346e2850a32497385c3", null ],
+ [ "test_find_max", "df/d42/binary__search__tree2_8cpp.html#a9856b68e2cba50d2e26a1cbe374e0365", null ],
+ [ "test_find_min", "df/d42/binary__search__tree2_8cpp.html#af2847a901160fd45b4044550e9921cb4", null ],
+ [ "test_get_elements_inorder", "df/d42/binary__search__tree2_8cpp.html#a06f35064850e891d6fda0093c0d9ee6e", null ],
+ [ "test_get_elements_postorder", "df/d42/binary__search__tree2_8cpp.html#a94b76f781fcbe1ad0e3397ace6bb1965", null ],
+ [ "test_get_elements_preorder", "df/d42/binary__search__tree2_8cpp.html#ab00b8d0f21aeb5fbddb6decf3bcb640a", null ],
+ [ "test_insert", "df/d42/binary__search__tree2_8cpp.html#a8c882f43e1e52948a7841a8bfb091350", null ],
+ [ "test_remove", "df/d42/binary__search__tree2_8cpp.html#ab1333c3ea06dcad896ee204bbd407c4e", null ]
+];
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.map b/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.map
new file mode 100644
index 000000000..771d05fb5
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.md5 b/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.md5
new file mode 100644
index 000000000..919d31ed4
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.md5
@@ -0,0 +1 @@
+12b43ed99260294eddee7796ff41a0fa
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.svg b/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.svg
new file mode 100644
index 000000000..6144bbf32
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.svg
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+test_get_elements_inorder
+
+
+
+Node1
+
+
+test_get_elements_inorder
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+binary_search_tree
+::get_elements_inorder
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node5
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node4
+
+
+binary_search_tree
+::traverse_inorder
+
+
+
+
+
+Node3->Node4
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.map b/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.map
new file mode 100644
index 000000000..a6691cc97
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.map
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.md5 b/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.md5
new file mode 100644
index 000000000..9c10404bc
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.md5
@@ -0,0 +1 @@
+5a9c2d3a96cc0daa9ac0fd167fe3d1ea
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.svg b/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.svg
new file mode 100644
index 000000000..d41fe0785
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.svg
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+test_contains
+
+
+
+Node1
+
+
+test_contains
+
+
+
+
+
+Node2
+
+
+binary_search_tree
+::contains
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+std::endl
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.map b/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.map
new file mode 100644
index 000000000..5b934d4b3
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.map
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.md5 b/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.md5
new file mode 100644
index 000000000..6a64e58cb
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.md5
@@ -0,0 +1 @@
+278030b7bf01fbcab16b269172b660c9
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.svg b/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.svg
new file mode 100644
index 000000000..ae4ffbcb1
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.svg
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+test_insert
+
+
+
+Node1
+
+
+test_insert
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+binary_search_tree
+::find_max
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+binary_search_tree
+::find_min
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node6
+
+
+binary_search_tree
+::size
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.map b/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.map
new file mode 100644
index 000000000..e033c9076
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.md5 b/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.md5
new file mode 100644
index 000000000..5eb70747f
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.md5
@@ -0,0 +1 @@
+e5a562ce4ee0805c753e5471af9843c8
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.svg b/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.svg
new file mode 100644
index 000000000..2653a983a
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.svg
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+test_get_elements_postorder
+
+
+
+Node1
+
+
+test_get_elements_postorder
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+binary_search_tree
+::get_elements_postorder
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node5
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node4
+
+
+binary_search_tree
+::traverse_postorder
+
+
+
+
+
+Node3->Node4
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.map b/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.map
new file mode 100644
index 000000000..2fd4c6e5c
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.map
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.md5 b/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.md5
new file mode 100644
index 000000000..ed471772b
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.md5
@@ -0,0 +1 @@
+798434dfc35cf5c4150f882fd5ef1a56
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.svg b/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.svg
new file mode 100644
index 000000000..5f315a5d8
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.svg
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+test_find_max
+
+
+
+Node1
+
+
+test_find_max
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+binary_search_tree
+::find_max
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.map b/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.map
new file mode 100644
index 000000000..0565c0eda
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.md5 b/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.md5
new file mode 100644
index 000000000..3fb3f1068
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.md5
@@ -0,0 +1 @@
+fec216d9fdaa44fbecc1fbbe5962cc24
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.svg b/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.svg
new file mode 100644
index 000000000..61e8b6280
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.svg
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+test_get_elements_preorder
+
+
+
+Node1
+
+
+test_get_elements_preorder
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+binary_search_tree
+::get_elements_preorder
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node5
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node4
+
+
+binary_search_tree
+::traverse_preorder
+
+
+
+
+
+Node3->Node4
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.map b/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.map
new file mode 100644
index 000000000..8ea3af47f
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.map
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.md5 b/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.md5
new file mode 100644
index 000000000..7a59acdae
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.md5
@@ -0,0 +1 @@
+8f2af181076079705117a24318e556cd
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.svg b/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.svg
new file mode 100644
index 000000000..fd6a95d4f
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.svg
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+test_remove
+
+
+
+Node1
+
+
+test_remove
+
+
+
+
+
+Node2
+
+
+binary_search_tree
+::contains
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+std::endl
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+binary_search_tree
+::find_max
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+binary_search_tree
+::find_min
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node6
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
+Node7
+
+
+binary_search_tree
+::remove
+
+
+
+
+
+Node1->Node7
+
+
+
+
+
+Node8
+
+
+binary_search_tree
+::size
+
+
+
+
+
+Node1->Node8
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.map b/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.map
new file mode 100644
index 000000000..de5acd289
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.map
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.md5 b/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.md5
new file mode 100644
index 000000000..db7372abf
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.md5
@@ -0,0 +1 @@
+7eae2975ebc863cccb392a7cd9b9e210
\ No newline at end of file
diff --git a/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.svg b/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.svg
new file mode 100644
index 000000000..fd6a51fea
--- /dev/null
+++ b/df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.svg
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+test_find_min
+
+
+
+Node1
+
+
+test_find_min
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+binary_search_tree
+::find_min
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+binary_search_tree
+::insert
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
diff --git a/df/dce/namespacegraph.html b/df/dce/namespacegraph.html
index 2a1c388ae..b39daa30f 100644
--- a/df/dce/namespacegraph.html
+++ b/df/dce/namespacegraph.html
@@ -418,7 +418,7 @@ Here is the call graph for this function:
-
+
@@ -452,12 +452,11 @@ Here is the call graph for this function:
- 105 if (dist[t] !=
INF ) {
+ 105 if (dist[t] != INF) {
-constexpr int64_t INF
for store the graph, the distances, and the path
Definition: bidirectional_dijkstra.cpp:23
@@ -468,7 +467,7 @@ Here is the call graph for this function:
-
diff --git a/df/dce/namespacegraph.js b/df/dce/namespacegraph.js
index 9ab4414fc..4818c4a95 100644
--- a/df/dce/namespacegraph.js
+++ b/df/dce/namespacegraph.js
@@ -5,6 +5,10 @@ var namespacegraph =
[ "Bidijkstra", "d7/d07/bidirectional__dijkstra_8cpp.html#aa3848a7213562b47084585499d3642a5", null ],
[ "Shortest_Path_Distance", "d7/d07/bidirectional__dijkstra_8cpp.html#ab322409d0015c023d91c67b5b2679257", null ]
] ],
+ [ "depth_first_search", null, [
+ [ "addEdge", "da/d4b/depth__first__search__with__stack_8cpp.html#a7511fcdb330b3ab599ff9e15229ae068", null ],
+ [ "dfs", "da/d4b/depth__first__search__with__stack_8cpp.html#ae198aeaad22ccd56712b7380bd62f777", null ]
+ ] ],
[ "disjoint_union", null, [
[ "find_set", "d8/d99/connected__components__with__dsu_8cpp.html#a469384d8a4197a9b24482ce7c321a85e", null ],
[ "make_set", "d8/d99/connected__components__with__dsu_8cpp.html#ae91ed94113c56191b75fe45f688d6e62", null ],
diff --git a/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.map b/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.map
index c981ce5f2..bdfe96c67 100644
--- a/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.map
+++ b/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.map
@@ -1,9 +1,4 @@
-
-
-
-
-
-
-
+
+
diff --git a/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.md5 b/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.md5
index a87c162e7..fcc27ffcc 100644
--- a/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.md5
+++ b/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.md5
@@ -1 +1 @@
-729f7975d6f04189100f29a9eddf81b5
\ No newline at end of file
+d37dcc0db19130368c0b23b1e4783053
\ No newline at end of file
diff --git a/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.svg b/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.svg
index d3ca24928..145519013 100644
--- a/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.svg
+++ b/df/dce/namespacegraph_a868530bfaed30e57290a76d5b4402d50_cgraph.svg
@@ -4,111 +4,34 @@
-
-
+
+
graph::dijkstra
-
+
Node1
-
-graph::dijkstra
+
+graph::dijkstra
Node2
-
-
-std::priority_queue
-::empty
+
+
+std::vector::size
Node1->Node2
-
-
-
-
-
-Node3
-
-
-std::make_pair
-
-
-
-
-
-Node1->Node3
-
-
-
-
-
-Node4
-
-
-std::priority_queue::pop
-
-
-
-
-
-Node1->Node4
-
-
-
-
-
-Node5
-
-
-std::priority_queue
-::push
-
-
-
-
-
-Node1->Node5
-
-
-
-
-
-Node6
-
-
-std::vector::size
-
-
-
-
-
-Node1->Node6
-
-
-
-
-
-Node7
-
-
-std::priority_queue::top
-
-
-
-
-
-Node1->Node7
-
-
+
+
diff --git a/dir_12552d7fa429bf94a2e32e5cf39f7e69.html b/dir_12552d7fa429bf94a2e32e5cf39f7e69.html
index a65200b15..80fbc0790 100644
--- a/dir_12552d7fa429bf94a2e32e5cf39f7e69.html
+++ b/dir_12552d7fa429bf94a2e32e5cf39f7e69.html
@@ -112,6 +112,9 @@ Files
file depth_first_search.cpp
Depth First Search Algorithm (Depth First Search)
+file depth_first_search_with_stack.cpp
+ Depth First Search Algorithm using Stack (Depth First Search Algorithm)
+
file dijkstra.cpp
<a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm"
diff --git a/dir_12552d7fa429bf94a2e32e5cf39f7e69.js b/dir_12552d7fa429bf94a2e32e5cf39f7e69.js
index 15abf6c4b..459411d1f 100644
--- a/dir_12552d7fa429bf94a2e32e5cf39f7e69.js
+++ b/dir_12552d7fa429bf94a2e32e5cf39f7e69.js
@@ -5,6 +5,7 @@ var dir_12552d7fa429bf94a2e32e5cf39f7e69 =
[ "connected_components.cpp", "df/ddd/connected__components_8cpp.html", "df/ddd/connected__components_8cpp" ],
[ "connected_components_with_dsu.cpp", "d8/d99/connected__components__with__dsu_8cpp.html", "d8/d99/connected__components__with__dsu_8cpp" ],
[ "depth_first_search.cpp", "da/d8d/depth__first__search_8cpp.html", "da/d8d/depth__first__search_8cpp" ],
+ [ "depth_first_search_with_stack.cpp", "da/d4b/depth__first__search__with__stack_8cpp.html", "da/d4b/depth__first__search__with__stack_8cpp" ],
[ "dijkstra.cpp", "d7/d1e/graph_2dijkstra_8cpp.html", "d7/d1e/graph_2dijkstra_8cpp" ],
[ "hamiltons_cycle.cpp", "dd/d0c/hamiltons__cycle_8cpp.html", "dd/d0c/hamiltons__cycle_8cpp" ],
[ "hopcroft_karp.cpp", "d1/d9a/hopcroft__karp_8cpp.html", "d1/d9a/hopcroft__karp_8cpp" ],
diff --git a/dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html b/dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html
index 055403e05..721b97a00 100644
--- a/dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html
+++ b/dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html
@@ -106,6 +106,9 @@ Files
file binary_search_tree.cpp
A simple tree implementation using structured nodes.
+file binary_search_tree2.cpp
+ A generic binary search tree implementation.
+
file binaryheap.cpp
A C++ program to demonstrate common Binary Heap Operations.
diff --git a/dir_2e746e9d06bf2d8ff842208bcc6ebcfc.js b/dir_2e746e9d06bf2d8ff842208bcc6ebcfc.js
index a314dad5b..87213c922 100644
--- a/dir_2e746e9d06bf2d8ff842208bcc6ebcfc.js
+++ b/dir_2e746e9d06bf2d8ff842208bcc6ebcfc.js
@@ -3,6 +3,7 @@ var dir_2e746e9d06bf2d8ff842208bcc6ebcfc =
[ "cll", "dir_f1797d0c2a0a12033e7d74efffeb14e1.html", "dir_f1797d0c2a0a12033e7d74efffeb14e1" ],
[ "avltree.cpp", "d8/dee/avltree_8cpp.html", "d8/dee/avltree_8cpp" ],
[ "binary_search_tree.cpp", "d3/d26/binary__search__tree_8cpp.html", "d3/d26/binary__search__tree_8cpp" ],
+ [ "binary_search_tree2.cpp", "df/d42/binary__search__tree2_8cpp.html", "df/d42/binary__search__tree2_8cpp" ],
[ "binaryheap.cpp", "de/dc3/binaryheap_8cpp.html", "de/dc3/binaryheap_8cpp" ],
[ "disjoint_set.cpp", "de/d23/disjoint__set_8cpp.html", "de/d23/disjoint__set_8cpp" ],
[ "linked_list.cpp", "da/dc3/linked__list_8cpp.html", "da/dc3/linked__list_8cpp" ],
diff --git a/files.html b/files.html
index b1a2121c9..aeb9387f6 100644
--- a/files.html
+++ b/files.html
@@ -117,19 +117,20 @@ solve-a-rat-in-a-maze-c-java-pytho/"
cll.h
avltree.cpp A simple tree implementation using nodes
binary_search_tree.cpp A simple tree implementation using structured nodes
- binaryheap.cpp A C++ program to demonstrate common Binary Heap Operations
- disjoint_set.cpp Disjoint Sets Data Structure (Disjoint Sets)
- linked_list.cpp Implementation of singly linked list algorithm
- linkedlist_implentation_usingarray.cpp Linked list implementation using Arrays
- list_array.cpp Dynamic Array
- queue.h
- queue_using_array.cpp Implementation of Linear Queue using array
- queue_using_two_stacks.cpp
- skip_list.cpp Data structure for fast searching and insertion in \(O(\log n)\) time
- stack.h This class specifies the basic operation on a stack as a linked list
- tree_234.cpp A demo 2-3-4 tree implementation
- trie_modern.cpp A basic implementation of trie class to store only lower-case strings
- trie_tree.cpp Implementation of Trie data structure for English alphabets in small characters
+ binary_search_tree2.cpp A generic binary search tree implementation
+ binaryheap.cpp A C++ program to demonstrate common Binary Heap Operations
+ disjoint_set.cpp Disjoint Sets Data Structure (Disjoint Sets)
+ linked_list.cpp Implementation of singly linked list algorithm
+ linkedlist_implentation_usingarray.cpp Linked list implementation using Arrays
+ list_array.cpp Dynamic Array
+ queue.h
+ queue_using_array.cpp Implementation of Linear Queue using array
+ queue_using_two_stacks.cpp
+ skip_list.cpp Data structure for fast searching and insertion in \(O(\log n)\) time
+ stack.h This class specifies the basic operation on a stack as a linked list
+ tree_234.cpp A demo 2-3-4 tree implementation
+ trie_modern.cpp A basic implementation of trie class to store only lower-case strings
+ trie_tree.cpp Implementation of Trie data structure for English alphabets in small characters
► dynamic_programming
0_1_knapsack.cpp Implementation of 0-1 Knapsack Problem
coin_change_topdown.cpp Minimum coins change problem is a problem used to find the minimum number of coins required to completely reach a target amount
@@ -148,11 +149,12 @@ solve-a-rat-in-a-maze-c-java-pytho/"
connected_components.cpp <a href="https://en.wikipedia.org/wiki/Component_(graph_theory)"
connected_components_with_dsu.cpp Disjoint union
depth_first_search.cpp Depth First Search Algorithm (Depth First Search)
- dijkstra.cpp <a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm"
- hamiltons_cycle.cpp The implementation of Hamilton's cycle dynamic solution for vertices number less than 20
- hopcroft_karp.cpp Implementation of Hopcroft–Karp algorithm
- is_graph_bipartite.cpp Algorithm to check whether a graph is bipartite
- lowest_common_ancestor.cpp Data structure for finding the lowest common ancestor of two vertices in a rooted tree using binary lifting
+ depth_first_search_with_stack.cpp Depth First Search Algorithm using Stack (Depth First Search Algorithm)
+ dijkstra.cpp <a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm"
+ hamiltons_cycle.cpp The implementation of Hamilton's cycle dynamic solution for vertices number less than 20
+ hopcroft_karp.cpp Implementation of Hopcroft–Karp algorithm
+ is_graph_bipartite.cpp Algorithm to check whether a graph is bipartite
+ lowest_common_ancestor.cpp Data structure for finding the lowest common ancestor of two vertices in a rooted tree using binary lifting
► graphics
spirograph.cpp Implementation of Spirograph
► greedy_algorithms
diff --git a/functions_b.html b/functions_b.html
index a721b85e1..0132986a8 100644
--- a/functions_b.html
+++ b/functions_b.html
@@ -99,12 +99,18 @@ $(document).ready(function(){initNavTree('functions_b.html',''); initResizable()
bfs()
: graph::HKGraph
+binary_search_tree()
+: binary_search_tree< T >
+
BinarySearch()
: data_structures::list_array::list
breadth_first_search()
: graph::Graph< T >
+bst_node()
+: binary_search_tree< T >::bst_node
+
diff --git a/functions_c.html b/functions_c.html
index 6dc513e1f..566731ebb 100644
--- a/functions_c.html
+++ b/functions_c.html
@@ -124,6 +124,9 @@ $(document).ready(function(){initNavTree('functions_c.html',''); initResizable()