Binary_tree is a simple package to create sort and search data with binary trees.
Project description
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
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
binary_tree-0.0.1.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for binary_tree-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41e58423e478bcbcbd3fd70b51b0d2c5f7b782b82e44001b51f6f3164264d857 |
|
MD5 | 7867f38c223540a700db7678d3faa580 |
|
BLAKE2b-256 | 2a0cb80516d7040392dee8a8efc8ab9041f72905f923f6530c52f6028b71487b |