binary-tree

Binary_tree is a simple package to create sort and search data with binary trees.


License
MIT
Install
pip install binary-tree==0.0.1

Documentation

Binary_tree


Binary_tree is a simple package to create sort and search data with binary trees

##install


pip install --upgrade binary_tree

usage


  • To create a tree use the tree object
  • Get a sorted array using the tree traverse function
  • Search an item (True/False) via the tree search function

####example

import binary_tree as bt
tree1 = bt.tree([1, 6, 3, 9])
print(tree1.traverse())

# returns [1, 3, 6, 9]
print(tree1.search(6))

#returns True

#####credits Creator: Ofri Kirshen