Problem: Invert Binary Tree Task: You are given the root of a binary tree. Invert the tree by swapping the left and right children of every node. Return the root of the inverted tree. This problem is famous.
It tests if you can modify a tree recursively. The idea is simple: flip the children at each node, then recurse on the children to flip their children, and so on. The base case is a null node, where you do nothing. This runs in time and space for the recursion stack.