42: Symmetric tree

Given a binary tree. Write a method to check does the tree symmetric around the center or not

 

Example 1

Input:        1
             / \
            2   2
           / \ / \
          3  4 4  3

Output: true

Example 2

Input:     1   
          / \  
         2   3 

Output: false