![]() |
TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
A generic binary search tree implementation. Here you can find more information about the algorithm: Scaler - Binary Search tree. More...
#include <cassert>#include <functional>#include <iostream>#include <memory>#include <vector>Go to the source code of this file.
Classes | |
| class | binary_search_tree< T > |
| The Binary Search Tree class. More... | |
| struct | binary_search_tree< T >::bst_node |
| A struct to represent a node in the Binary Search Tree. More... | |
Functions | |
| static void | test_insert () |
| Function for testing insert(). | |
| static void | test_remove () |
| Function for testing remove(). | |
| static void | test_contains () |
| Function for testing contains(). | |
| static void | test_find_min () |
| Function for testing find_min(). | |
| static void | test_find_max () |
| Function for testing find_max(). | |
| static void | test_get_elements_inorder () |
| Function for testing get_elements_inorder(). | |
| static void | test_get_elements_preorder () |
| Function for testing get_elements_preorder(). | |
| static void | test_get_elements_postorder () |
| Function for testing get_elements_postorder(). | |
| int | main () |
A generic binary search tree implementation. Here you can find more information about the algorithm: Scaler - Binary Search tree.
Definition in file binary_search_tree2.cpp.
| int main | ( | void | ) |
Definition at line 556 of file binary_search_tree2.cpp.
|
static |
Function for testing contains().
Definition at line 429 of file binary_search_tree2.cpp.
|
static |
Function for testing find_max().
Definition at line 475 of file binary_search_tree2.cpp.
|
static |
Function for testing find_min().
Definition at line 452 of file binary_search_tree2.cpp.
|
static |
Function for testing get_elements_inorder().
Definition at line 498 of file binary_search_tree2.cpp.
|
static |
Function for testing get_elements_postorder().
Definition at line 540 of file binary_search_tree2.cpp.
|
static |
Function for testing get_elements_preorder().
Definition at line 519 of file binary_search_tree2.cpp.
|
static |
Function for testing insert().
Definition at line 358 of file binary_search_tree2.cpp.
|
static |
Function for testing remove().
Definition at line 392 of file binary_search_tree2.cpp.