Skip to content

spbu-coding-2022/trees-12

Repository files navigation


Logo

Search Trees Project

AVL, Red-Black and Binary Search Trees models.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. App Usage
  4. License
  5. Contact
  6. Acknowledgments

About The Project

Many people use search engines to classify various information, as well as quickly obtain the necessary data. Our task is to study this issue in practice, which implies the development of search trees with a detailed study of all the subtleties of each model.

Types of search trees that we are going to implement:

  • A simple Binary Search Tree.
  • Red-Black Search Tree.
  • AVL Search Tree.

Of course, our task is not only to develop the algorithm of the application itself, but also to implement the user interface to work with it, create test coverage and decent documentation.

(Back to top)

Used Technologies

Technologies used to develop the project:

  • gradle
  • gradle
  • gradle
  • gradle
  • gradle
  • gradle
  • gradle

(Back to top)

Getting Started

To start working with our development, you need to clone repository:

  • git

    git clone https://github.com/spbu-coding-2022/trees-12.git

To initialize the library and start working with it, you need to know the following lines:

  • Initializing BinarySearchTree (default RedBlackTree):

    val tree = binarySearchTreeOf<KeyType, ValueType>()
  • Initializing simple BinarySearchTree:

    val tree = SimpleBinarySearchTree<KeyType, ValueType>()
  • Initializing RedBlackTree:

    val tree = RedBlackTree<KeyType, ValueType>()
  • Initializing AVLTree:

    val tree = AVLTree<KeyType, ValueType>()

To work with trees, you also need to know the management commands:

  • Inserting a value by key:

    tree[key] = value
  • Getting a value by key:

    val value = tree[key]
  • Deleting a value by key:

    tree.remove(key)

App Usage

Before launching the application, you need to run "neo4j" via "docker":

  • This is done by the command in project repository:
docker compose up -d

You also need to build the application and run it:

  • This is done by the command:
./gradlew run

A little bit about the user interface:

  • After launching the application, a window will appear in which you can select the desired type of tree, as well as previously saved models of this type.

Start

  • After you select the tree, a window will appear with functional buttons for adding, deleting and searching for values by key. Also, above the buttons you can see the type of the selected tree, and below them there will be buttons for saving and deleting the current model.

Main

(Back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(Back to top)

Contact

Baitenov Arsene • Telegram[email protected]
Gryaznov Artem • Telegram[email protected]

Project Link • https://github.com/spbu-coding-2022/trees-12

(Back to top)

Acknowledgments

The resources that we used to get information about binary search trees, their features and implementation possibilities:

(Back to top)

About

trees-12 created by GitHub Classroom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages