Binary Search Tree
Implement a binary search tree data structure, which is a special case of a binary tree that follows specific rules.
The rule that a binary search tree follows in this case is:
- It is a binary tree (no more than 2 children)
- A node's left child has a value that is is less than the node's own value
- A node's right child has a value that is is greater than or equal to the node's own value
Directions
Find the starter code in binarySearchTree.js
or binary_search_tree.py
. Pick the language of your choice. Implement all functions!
Bonuses
- Implement this in the other language
- Implement an in-order, post-order, or pre-order traversal