There are two possible cases for n1 and n2 to be isomorphic Case 1 : The subtrees rooted at these nodes have NOT been " Flipped " . Both of these subtrees have to be isomorphic , hence the && Case 2 : The subtrees rooted at these nodes have been " Flipped "
return ( ( isIsomorphic ( n1 . left , n2 . left ) and isIsomorphic ( n1 . right , n2 . right ) ) or ( isIsomorphic ( n1 . left , n2 . right ) and isIsomorphic ( n1 . right , n2 . left ) ) ) NEW_LINE