recursive function to find the Inorder Scuccessor when the right child of node x is NULL
Node * findInorderRecursive ( Node * root , Node * x ) { if ( ! root ) return NULL ; if ( root == x || ( temp = findInorderRecursive ( root -> left , x ) ) || ( temp = findInorderRecursive ( root -> right , x ) ) ) { if ( temp ) { if ( root -> left == temp ) { cout << " Inorder ▁ Successor ▁ of ▁ " << x -> data ; cout << " ▁ is ▁ " << root -> data << " STRNEWLINE " ; return NULL ; } } return root ; } return NULL ; }