A simple, efficient, and user-friendly library for working with various balanced and unbalanced tree data structures, written in Kotlin.
- Vladimir Pugovkin
- Tatyana Gromova
- Rafael
- ✅ AVL Trees
- ✅ Red-Black (RB) Trees
- ✅ Binary Search Trees (BST)
git clone https://github.com/spbu-coding-2024/trees-trees-team-11.git
cd trees-trees-team-11Execute demos for each tree type using the following commands:
AVL Tree
./gradlew :examples:exampleAVL:runRed-Black Tree (RB)
./gradlew :examples:exampleRB:runBinary Search Tree (BST)
./gradlew :examples:exampleBST:runTo use the library, instantiate objects of supported tree types as shown below:
val avlTree = AVLTree<YourKeyType, YourValueType>()val rbTree = RBTree<YourKeyType, YourValueType>()val bsTree = BSTree<YourKeyType, YourValueType>()height()— Returns the height of the treecontainsKey(key)— Checks if the tree contains a specific keyinsert(key, value)— Inserts a key-value pair into the treeerase(key)— Removes a node by keyclean()— Clears the entire tree
This project is licensed under the MIT License.
© 2025