Trees 313
Consider the BST given in Figure 7.26. The inorder successor of internal node 45 is 48, and that of
56 is 58. Similarly, in Figure 7.22, the inorder successors of internal nodes 90, 108, and 110 are 104, 109,
and 117, respectively and each one of the successor node has no left child. It may be further noted that
the successor node is always present in the right sub-tree of the internal node.
The successor of a node can be reached by first moving to its right child and then keep going to left
till a NULL is found as shown in Figure 7.27.
It may be further noted that if an internal node ptr is to be deleted then the contents of inorder ...