Dsa
Trees
Easy
Symmetry Check
Write a program that checks if a binary tree is symmetric around its center. A tree is symmetric if the left subtree is a mirror reflection of the right subtree.
Input format:
A series of integers in level order, where 'N' represents a null node.
Example Input:
1 2 2 3 4 4 3
Output format:
"True" if the tree is symmetric, otherwise "False".
Example:
Input:
1 2 2 3 4 4 3
Output:
True
Key concepts
treessymmetrytraversal
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now