Skip to main content

A small example package

Project description

About


This is a simple python module to create and manipulate Binary trees.

Binary Trees and Nodes

A binary tree object can be created with. BinaryTree.BinaryTree(root)

This will create a binary tree with one (root) node. To add nodes, just use BinaryTree.appendNode(value). At any time, you can call the delete() function on a Node() object to destroy it. This will re-add all other nodes to the tree. A list of nodes can be accessed with BinaryTree.nodes. Other functions and attributes include:

BinaryTree()

  • appendNode(value)
  • printTree()
  • sort()
  • nodes
  • root

Node()

  • delete()
  • children
  • isLeaf
  • left
  • level
  • parent
  • right
  • side
  • tree
  • value

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

BinaryTrees-1.0.0.tar.gz (1.2 kB view hashes)

Uploaded Source

Built Distribution

BinaryTrees-1.0.0-py3-none-any.whl (1.6 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