Skip to main content

A binary search tree implemented for learning purposes.

Project description

bst

Build Status

In school, I struggled with how binary search trees (and related data structures & algorithms) work, but now with a little more programming experience under my belt I decided to work through implementing one. It currently has insert, search, and traversal functionality.

Install

pip install bst

Usage

from bst import BST

bst = BST()
bst.insert(5)
node = bst.search(5)  # <bst.Node object at 0x1060964e0>
node.value  # 5

Development

The only dependency is nose, it's used to automatically run all of the unit tests in tests/. Install dependencies with pip install -r requirements.txt, and run the tests with nosetests -v.

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

bst-0.5.0.tar.gz (3.3 kB view hashes)

Uploaded source

Built Distribution

bst-0.5.0-py2.py3-none-any.whl (3.1 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page