Pick the fix
Which pairs must be compared at each step?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Outer children with each other, and inner children with each other
Right: a reflection swaps left and right at every level.
Reflection maps the far left onto the far right, so the comparisons cross over at every depth.
Why not the others?
- B Each node's left child with its own right child. That only checks one level, not the whole reflection.
- C Left with left, right with right. That is the identical-trees check, not a reflection.