Skip to main content

No project description provided

Project description

py-simple-trees

This package is a implementation collection of tree data structures.

Test Publish Coverage Package version Downloads

PyPI - Python Version


Documentation: https://lpthong90.dev/py-simple-trees

Source Code: https://github.com/lpthong90/py-simple-trees


This package is a implementation collection of tree data structures.

Installation

$ pip install py-simple-trees

---> 100%

Successfully installed py-simple-trees

Tree Types

  • Binary Tree
  • Binary Search Tree (BST)
  • AVL Tree

Basic Usage

from py_simple_trees import AVLTree

if __name__ == "__main__":
    tree = AVLTree()

    tree.insert(1, 1)
    tree.insert(2, 2)
    tree.insert(3, 3)
    tree.insert(4, 4)
    tree.insert(5, 5)
    tree.insert(6, 6)
    tree.insert(7, 7)

    tree.print()

Output

4 --L--> 2
4 --R--> 6
2 --L--> 1
2 --R--> 3
6 --L--> 5
6 --R--> 7

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_simple_trees-0.1.3.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

py_simple_trees-0.1.3-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page