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


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for binary-tree, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size binary_tree-0.0.1-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size binary_tree-0.0.1.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page