I'm studying for my CS final and I can't seem to get the anywhere with one of the questions.This is the question:Prove that if a node in a BST has a successor, but has no right child, then its successor must be an ancestor. (We will consider only BSTs with distinct elements.)I know that a successor is the node that replaces the deleted node, and that we only need to worry about this case when the node being deleted has two children, but I can't seem to start this proof.Any help?
BST Successor Proof
proof techniques;binary trees;binary search