Let us construct the Tree shown in the above figure
BinaryTree tree = new BinaryTree ( ) ; tree . root = new Node ( 1 ) ; tree . root . left = new Node ( 2 ) ; tree . root . right = new Node ( 2 ) ; tree . root . left . left = new Node ( 3 ) ; tree . root . left . right = new Node ( 4 ) ; tree . root . right . left = new Node ( 4 ) ; tree . root . right . right = new Node ( 3 ) ; boolean output = tree . isSymmetric ( ) ; if ( output == true ) System . out . println ( " Symmetric " ) ; else System . out . println ( " Not ▁ symmetric " ) ; } }