Binary Search Tree in python
BST data structure supports many dynamic-set operations including
- Search
- Minimum
- Maximum
- Predecessor
- Successor
- Insert
- Delete
These basic operations allow us to treat this data structure both as a dictionary and as a priority queue.
Basic operations on a binary tree takes time proportional to the height of the tree, O(lg n) [worst case] and even O(n) if the tree is a linear chain.
If you want to learn more about practical application of these trees check this post out.
Here I present a very basic version of binary tree written in python
Read other posts