Binary Search Tree data structure implementation.
C++11C++ versionCMakebuild systemg++C++ compilerSTLonly libraries
- CMake 3.8
- gcc
- c++11
mkdir build
cmake . -B build
cmake --build build --target allBST();- Default constructorvoid insert(KEY_T key);- insert new element into the treevoid remove(KEY_T key);- remove element from the treeKEY_T min() const;- Return tree min key valueKEY_T max() const;- Return tree max key valuebool is_empty() const;- Check if tree is emptysize_t size() const;- Return number of tree elementsbool contains(KEY_T key) const;- Check if the BST contains given key
Example 1: Demonstrate library usage with double type
Example 2: Demonstrate library usage with integer type