Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Compare two opposite branches recursively and ensure each pair of nodes mirrors value and structure.
A tree is symmetric only if left subtree and right subtree are mirror images at every level.
Updated Feb 2026