when cant a bst search for an item code example
Example: Searching for a node in a BST
def search(bst, value):
if bst is None or bst.get_data() == value:
return bst
if bst.get_data() < value:
return search(bst.get_right(), value)
return search(bst.get_left(), value)