Completed BST implementation