Skip to main content Link Search Menu Expand Document (external link)

Binary Search Trees (BST)

SECTION INCOMPLETE: Review Content and Add

Implentation of BST

Implementation: Using TreeNode class and BinarySearchTree class 1

  • BinarySearchTree class
    • def put(self, key, val) Insert key in BST O(n)
    • def get(self, key) Get key in BST O(n)
    • def delete(self, key) Delete key in BST O(n)
  • TreeNode class
    • def findSuccessor(self) : find the successor node
    • def findMin(self) : find the minimum node in the subtree
    • def spliceOut(self) : remove the node