Add the methods successor and predecessor to the BST class. Each method expects an item as an argument and returns an item or None. A successor is the smallest item in the tree that is greater than the given item. A predecessor is the largest item in the tree that is less than the given item. Note that the successor may exist even if the given item is not present in the tree.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here