Skip to main content

No project description provided

Project description

ci

Binary Tree

A binary tree implementation is available:

from datastructures import Tree, Node

tree = Tree()
tree.size()        // 0
tree.max_depth()   // 0
tree.root          // None
root = tree.add()  // Node
root.left = Node()
tree.size()        // 2
tree.max_depth()   // 2

To check if the tree is a binary search tree:

tree.is_bst()

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

datastructures-0.1.0.tar.gz (88.0 kB view hashes)

Uploaded Source

Built Distribution

datastructures-0.1.0-cp35-cp35m-macosx_10_11_x86_64.whl (138.5 kB view hashes)

Uploaded CPython 3.5m macOS 10.11+ x86-64

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