Invalid test case? Passed 76/77
The question says tree contains unique integers.\n```\nFailed Testcase-\n\n[1,3,3,4,5,6,null,null,null,7,8]\n[1,3,3,null,6,4,5,null,null,null,null,8,7]\n\npubli
The question says tree contains unique integers.\n```\nFailed Testcase-\n\n[1,3,3,4,5,6,null,null,null,7,8]\n[1,3,3,null,6,4,5,null,null,null,null,8,7]\n\npublic boolean flipEquiv(TreeNode root1, TreeNode root2)\n    {\n        Queue<TreeNode> q1 = new LinkedList<>();\n        Queue<TreeNode> q2 = new LinkedList<>();\n        \n        q1.add(root1);\n        q2.add(root2);\n        if(root1==null && root2==null)\n            return true;\n        if((root1==null && root2!= null) || (root2==null && root1!=null))\n            return false;\n        \n        while(q1.size()!=0 && q2.size()!=0)\n        {\n            TreeNode curr1 = q1.poll();\n            TreeNode curr2 = q2.poll();\n            \n            if(curr1.val != curr2.val)\n                return false;\n            \n            if(curr1.left!=null)\n            {\n                q1.add(curr1.left);\n                if(curr2.right != null && curr2.right.val == curr1.left.val)\n                    q2.add(curr2.right);\n                else if (curr2.left!= null && curr2.left.val == curr1.left.val)\n                    q2.add(curr2.left);\n                else return false;\n            }\n                \n            if(curr1.right!=null)\n            {\n                q1.add(curr1.right);\n                if(curr2.right != null && curr2.right.val == curr1.right.val)\n                    q2.add(curr2.right);\n                else if (curr2.left!=null && curr2.left.val == curr1.right.val)\n                    q2.add(curr2.left);\n                else return false;\n            }\n                \n        }\n        if(q1.size()!=q2.size())\n            return false;\n        return true;\n        \n    }
[]