Skip to main content

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


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)

Uploaded Source

Built Distribution

binary_tree-0.0.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page