Metadata-Version: 2.4
Name: python-binary-tree
Version: 1.0.2
Summary: Binary tree implementation for Python
Home-page: https://github.com/HangoverHGV/python-binary-tree
Author: HangoverHGV
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: networkx
Requires-Dist: matplotlib
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# python-binary-tree
A simple implementation of a binary tree in Python.

## Installation
```bash 
pip install python-binary-tree
```
## Usage
```python
from binary_tree import BinaryTree
from binary_tree import BinaryTreeNode
# Create a binary tree and add nodes
bt = BinaryTree()
# Create nodes with values
root = BinaryTreeNode(0)
node1 = BinaryTreeNode(1)
node2 = BinaryTreeNode(2)
node3 = BinaryTreeNode(3)
node4 = BinaryTreeNode(4)
node5 = BinaryTreeNode(5)

# Add relationships between nodes
root.add_left(node1)
root.add_right(node2)

node1.add_right(node3)
node2.add_right(node4)
node1.add_left(node5)

# Insert nodes into the binary tree
bt.insert(root)
bt.insert(node1)
bt.insert(node2)

bt.draw()
```
### Example Output
![exampleplot.png](https://raw.githubusercontent.com/HangoverHGV/python-binary-tree/master/exampleplot.png)

