recursive function to find the Inorder Scuccessor when the right child of node x is null
public static Node findInorderRecursive ( Node root , Node x ) { if ( root == null ) { return null ; } if ( root == x || ( temp = findInorderRecursive ( root . left , x ) ) != null || ( temp = findInorderRecursive ( root . right , x ) ) != null ) { if ( temp != null ) { if ( root . left == temp ) { Console . Write ( " Inorder ▁ Successor ▁ of ▁ " + x . data ) ; Console . Write ( " ▁ is ▁ " + root . data + " STRNEWLINE " ) ; return null ; } } return root ; } return null ; }