Example
#include <iostream>
#include <string>
int main() {
tree.
Insert(45,
"forty-five");
std::cout << key << " -> " << value << std::endl;
});
std::cout << std::endl;
std::cout << key << " -> " << value << std::endl;
});
std::cout << std::endl;
std::cout << key << " -> " << value << std::endl;
});
std::cout << std::endl;
return 0;
}
Definition: AVLTree.hpp:35
void InOrderTraversal(Handler handler)
Definition: AVLTree.hpp:228
void PreOrderTraversal(Handler handler)
Definition: AVLTree.hpp:224
void PostOrderTraversal(Handler handler)
Definition: AVLTree.hpp:232
void Insert(const Key &key, const Value &value)
Definition: AVLTree.hpp:240
How to Build
Linux & macOS
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
~/vcpkg/bootstrap-vcpkg.sh
git clone https://github.com/xorz57/AVLTree.git
cd AVLTree
cmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Release
ctest --build-config Release
Windows
git clone https://github.com/microsoft/vcpkg.git C:/vcpkg
C:/vcpkg/bootstrap-vcpkg.bat
C:/vcpkg/vcpkg.exe integrate install
git clone https://github.com/xorz57/AVLTree.git
cd AVLTree
cmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Release
ctest --build-config Release