Problem Description
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
1 <= number of nodes <= 105
First and only argument is the root node of the binary tree.
Return 0 / 1 ( 0 for false, 1 for true ).
Input 1:
1 / \ 2 2 / \ / \ 3 4 4 3
Input 2:
1 / \ 2 2 \ \ 3 3
Output 1:
1
Output 2:
0
Explanation 1:
The above binary tree is symmetric.
Explanation 2:
The above binary tree is not symmetric.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.