Invert Binary Tree
Problem
Invert a binary tree.
Example
1 1
/ \ / \
2 3 => 3 2
/ \
4 4
Challenge
Do it in recursion is acceptable, can you do it without recursion?
Invert a binary tree.
1 1
/ \ / \
2 3 => 3 2
/ \
4 4
Do it in recursion is acceptable, can you do it without recursion?