public static void main(String args[]){
        int in1[] = {8,5,6,10,11,9,12};
        int pre1[] = {10,5,8,6,9,11,12};
        int in2[] = {11,9,12,10,6,5,15};
        int pre2[] = {10,9,11,12,5,6,15};
        ConstructTreeFromInOrderPreOrder ct = new ConstructTreeFromInOrderPreOrder();
        Node root1 = ct.createTree(in1, pre1);
        Node root2 = ct.createTree(in2, pre2);
        TreeIsomorphism ti = new TreeIsomorphism();
        System.out.println(ti.areIsomorphicTrees(root1, root2));
    }
http://www.geeksforgeeks.org/tree-isomorphism-problem/
Test cases:
Same tree
Exact mirror
Some nodes flipped
src/com/interview/tree/TreeIsomorphism.java