This repository contains the code for implementing an AVL tree (balanced binary search tree) in Python. The implementation covers the Node and Tree classes, build_tree() method, and the insert() and delete() methods for inserting and removing nodes in the AVL tree.
- Node class with attributes for key value, parent node, left and right children, and height
- Tree class with a build_tree() method for constructing a balanced binary search tree from a list of items
- Insert() and delete() methods for adding and removing nodes while maintaining the balance of the tree
- Clone the repository:
git clone https://github.com/sminerport/avl-tree-implementation.git
- Navigate to the repository folder:
cd avl-tree-implementation
- Run the main script:
python main.py
- Python 3.x
Feel free to contribute to this project by submitting a pull request or reporting any issues you encounter.
This project is licensed under the MIT License. See the LICENSE file for more information.