S
All challenges
Practice
Home
Blog
Practice
Examples
Feedback
Symmetric Binary Tree
00:00
Start
00:00
Sign in
Problem
Hints
3
Solution
History
Easy
Tree
DFS
BFS
Recursion
Amazon
Microsoft
Check if a binary tree is symmetric (mirror image of itself around its center).
Examples
Example 1
Input →
[1,2,2,3,4,4,3]
Output →
True
Example 2
Input →
[1,2,2,null,3,null,3]
Output →
False
Example 3
Input →
[1]
Output →
True
JavaScript
Python
Java (Coming soon)
C (Coming soon)
C++ (Coming soon)
Reset
Run
Submit
Cases
Results