Paytm Menu Tree Symmetric Check
Paytm Menu Tree Symmetric Check
EasyTrees66% accepted
Paytm's home screen menu is modeled as a binary tree. Check whether the tree is a mirror of itself (symmetric around its center). A tree is symmetric if the left subtree is a mirror reflection of the right subtree.
Approach
Check if a binary tree is symmetric (mirror of itself).
Input
7
1 2 2 3 4 4 3
Output
true
More Trees problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards