This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Draw binary tree in plain text

Usage

Draw tree from level order traversal, ‘#’ signifies a path terminator where no node exists below.

from drawtree import draw_level_order
draw_level_order('{3,9,20,#,#,15,7}')
  3
 / \
9  20
   / \
  15  7

Draw random binary search tree

from drawtree import draw_random_bst
draw_random_bst(10)
    64
    / \
   /   \
  4    66
   \     \
   37    70
   / \
  8  51
 / \
6  12
     \
     21

Draw binary search tree from integer array

from drawtree import draw_bst
nums = [55, 30, 10, 5, 2, 20, 15, 25, 40, 35, 70, 60, 80, 75, 95]
draw_bst(nums)
             55
             / \
            /   \
           /     \
          /       \
         30       70
        / \       / \
       /   \     /   \
      /     \   60   80
     10     40       / \
    / \     /       /   \
   /   \   35      75   95
  5    20
 /     / \
2     /   \
     15   25

Installation

To install drawtree, simply:

$ pip install drawtree

Licence

MIT

Reference

Draw tree

Authors

drawtree was written by Madhusudan Banik.

Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
drawtree-0.1.1.tar.gz (4.4 kB) Copy SHA256 Checksum SHA256 Source Oct 3, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting