Concept Flow - Check if Two Trees are Symmetric
Start with root nodes of both trees
Check if both nodes are None?
Yes→Return True
No
Check if one node is None or values differ?
Yes→Return False
No
Recursively check left subtree of first tree with right subtree of second tree
Recursively check right subtree of first tree with left subtree of second tree
Return True if both recursive checks are True, else False
The flow compares nodes of two trees starting from roots, checking symmetry by matching left subtree of one with right subtree of the other recursively.
