Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.33 KB

README.md

File metadata and controls

23 lines (17 loc) · 1.33 KB

BalancedTreeLib

This repository contains the code for implementing an AVL tree (balanced binary search tree) in Python, with additional functionality for logging operations and visualizing the tree structure. The implementation includes the Node and Tree classes, methods for building, inserting, deleting, and rebalancing the tree, and a Logger class for capturing program output.

Features

  • Node Class: Includes attributes for the key value, parent node, left and right children, and height.
  • Tree Class: Provides methods for constructing a balanced binary search tree from a list of items, inserting and deleting nodes, and ensuring the tree remains balanced.
  • Logging: Captures program output and logs it to a file for easy debugging and review.
  • Tree Visualization: Generates a visual representation of the AVL tree for easy inspection.

Getting Started

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

Dependencies

  • Python 3.x

Contributing

Contributions are welcome! Feel free to submit a pull request or report any issues you encounter.

License

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