Skip to main content

A simple package to draw Binary Tree and balance the tree using AVL algorithm

Project description

Py-AVL-Tree

A python package to make a Tree's like a Binary Tree and Balanced AVL Tree.

How to install?

Use:

pip install Py-AVL-Tree

How to use?

First, import the AVL class.

from TreeAVL.AVL import AVL

Now, you have to parse a list with nodes to create a object tree.

from TreeAVL.AVL import AVL

tree = AVL([10, 5, 15, 7, 18, 9])

To show your binary tree, just parse your new object tree to print.

from TreeAVL.AVL import AVL

tree = AVL([10, 5, 15, 7, 18, 9])
print(tree)

If you have to balance your tree, just call the method BalanceTree()

from TreeAVL.AVL import AVL

tree = AVL([10, 5, 15, 7, 18, 9])
print(tree)
tree.BalanceTree()
print(tree)

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-AVL-Tree-0.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

Py_AVL_Tree-0.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file Py-AVL-Tree-0.0.2.tar.gz.

File metadata

  • Download URL: Py-AVL-Tree-0.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12

File hashes

Hashes for Py-AVL-Tree-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a79b4e471a8b1d371b89787ebaab83dbba8a0530433f1282728066cd49ffd6c6
MD5 bc2d24b12bd2f80514c727f448a0e035
BLAKE2b-256 ded7d8418b6950ff526bfe0820079b5b012e34c96a0d8080d530ddf06a4594aa

See more details on using hashes here.

File details

Details for the file Py_AVL_Tree-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: Py_AVL_Tree-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12

File hashes

Hashes for Py_AVL_Tree-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f3c6833551f5e88667615f17f71c9b0d5ca0a338f1b8361bcae1cedaf4c4b32
MD5 85966aaa4da68be90fa3fb4890c6f64e
BLAKE2b-256 9616a1a67a2d81dfb4b0006d74f0f263977549718fd9d1f147d5289a5ed0ea50

See more details on using hashes here.

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