Skip to content

AVL Tree Implementation in Python: This repository provides a comprehensive implementation of an AVL tree (balanced binary search tree) with Node and Tree classes, build_tree() method, and insert() and delete() methods. The code demonstrates AVL tree construction, node insertion and removal, and tree rebalancing for maintaining optimal performance.

License

Notifications You must be signed in to change notification settings

sminerport/avl-tree-implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AVL Tree Implementation

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.

Features

  • 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

Getting Started

  1. Clone the repository: git clone https://github.com/sminerport/avl-tree-implementation.git
  2. Navigate to the repository folder: cd avl-tree-implementation
  3. Run the main script: python main.py

Dependencies

  • Python 3.x

Contributing

Feel free to contribute to this project by submitting a pull request or reporting any issues you encounter.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

AVL Tree Implementation in Python: This repository provides a comprehensive implementation of an AVL tree (balanced binary search tree) with Node and Tree classes, build_tree() method, and insert() and delete() methods. The code demonstrates AVL tree construction, node insertion and removal, and tree rebalancing for maintaining optimal performance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages