So the in order successor is H but why?
The inorder successor means the element which is just greater than the root(the node whose inorder successor we want to find)
Here the inorder successor of A will be H as if the tree follows binary tree property then the right subtree will have all the elements greater than it and left subtree has all the elements smaller than it (assuming distinct values) hence we have to find a value just greater than A which will lie in right subtree but we have to make sure it is minimum in the right subtree to make it just greater than A hence it will be the leftmost value in the right subtree of that node.
Do give a thumbs up and in case there are doubts leave a comment.
So the in order successor is H but why? h Quiz5 xQuiz 5 - Google DocsNew...