Skip to content

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

License

Notifications You must be signed in to change notification settings

Elielson68/Py-AVL-Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages