public boolean areIsomorphicTrees(Node root1, Node root2) {
        if (root1 == null && root2 == null) {
            return true;
        }
        
        if(root1 == null || root2 == null){
            return false;
        }

        return root1.data == root2.data
                && ((areIsomorphicTrees(root1.left, root2.left) && areIsomorphicTrees(
                        root1.right, root2.right)) || (areIsomorphicTrees(
                        root1.left, root2.right) && areIsomorphicTrees(
                        root1.right, root2.left)));

    }
http://www.geeksforgeeks.org/tree-isomorphism-problem/
Test cases:
Same tree
Exact mirror
Some nodes flipped
src/com/interview/tree/TreeIsomorphism.java