Skip to content

spbu-coding-2024/trees-trees-team-11

Repository files navigation

🌳 Tree Data Structures Library

A simple, efficient, and user-friendly library for working with various balanced and unbalanced tree data structures, written in Kotlin.


📌 Authors

  • Vladimir Pugovkin
  • Tatyana Gromova
  • Rafael

🌲 Supported Tree Structures

  • AVL Trees
  • Red-Black (RB) Trees
  • Binary Search Trees (BST)

🚀 Quick Start

Clone Repository

git clone https://github.com/spbu-coding-2024/trees-trees-team-11.git
cd trees-trees-team-11

Run Examples

Execute demos for each tree type using the following commands:

AVL Tree

./gradlew :examples:exampleAVL:run

Red-Black Tree (RB)

./gradlew :examples:exampleRB:run

Binary Search Tree (BST)

./gradlew :examples:exampleBST:run

📚 Usage Guide

To 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>()

Supported Operations

  • height() — Returns the height of the tree
  • containsKey(key) — Checks if the tree contains a specific key
  • insert(key, value) — Inserts a key-value pair into the tree
  • erase(key) — Removes a node by key
  • clean() — Clears the entire tree

📄 License

This project is licensed under the MIT License.

© 2025

About

trees-trees-team-11 created by GitHub Classroom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages