Position: SDE Intern
Given two binary trees, they are said to be mirror equal to each other iff view of their leaves are mirrored image of each other.
SOLUTION
- Do in-order traversal of tree, and push each leaf node into an ArrayList(in java)/ vector(in c++)
- Do the above process for both the trees
- Answer is YES if one list is equal to other's reverse