This problem was asked by Twitter.
You are given the root of a binary tree. Invert the binary tree in place.
That is, all left children should become right children, and all right children should become left children.
Given:
a
/ \
b c
/ \ /
d e f
Inverted:
a
/ \
c b
\ / \
f e d