Given the root of a binary tree, invert the tree (mirror it) and return its root.
Input: [4,2,7,1,3,6,9] Output: [4,7,2,9,6,3,1]
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features