A small example package
Project description
About
This is a simple python module to create and manipulate Binary trees.
Binary Trees and Nodes
A binary tree object can be created with.
BinaryTree.BinaryTree(root)
This will create a binary tree with one (root) node. To add nodes, just use BinaryTree.appendNode(value)
.
At any time, you can call the delete()
function on a Node()
object to destroy it. This will re-add all other nodes to the tree.
A list of nodes can be accessed with BinaryTree.nodes
.
Other functions and attributes include:
BinaryTree()
appendNode(value)
printTree()
sort()
nodes
root
Node()
delete()
children
isLeaf
left
level
parent
right
side
tree
value
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
BinaryTrees-1.0.0.tar.gz
(1.2 kB
view hashes)
Built Distribution
Close
Hashes for BinaryTrees-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93699480c4a51740b0ff50055982f70856c665f37062ab1a2323f71d17f30f41 |
|
MD5 | 3d2ba1e6ee757c18b304ac1bbae81eb6 |
|
BLAKE2b-256 | be67368e2f7ca696e68ebfce46b865acb2b0351589124c3671ad7d1e08a3e946 |