Concept Flow - Check if Two Trees are Symmetric
Start with two root nodes
Are both nodes NULL?
Yes→Return True
No
Is one node NULL?
Yes→Return False
No
Do nodes have same value?
No→Return False
Yes
Check left subtree of first with right subtree of second
Check right subtree of first with left subtree of second
Return AND of both subtree checks
The function compares two trees by checking root values and recursively comparing left subtree of one with right subtree of the other, ensuring mirror symmetry.
