Case2 : If root data is equal to search node
if ( root . data == searchNode ) System . out . println ( " inorder ▁ successor ▁ of ▁ " + searchNode + " ▁ is : ▁ " + ( pre . pNode != null ? pre . pNode . data : " null " ) ) ; pre . pNode = root ; if ( root . left != null ) inOrderSuccessorOfBinaryTree ( root . left , pre , searchNode ) ; }