Re:Invert a binary tree on LeetCode
by falcolas on Saturday June 13, 2015 @08:59AM
(#9710861)
I have to admit, the idea of swapping children on all of the nodes would not have come to me immediately as a solution for reversing the sorted tree - I have not been exposed to that kind of application before, and haven't spent a lot of time thinking about that kind of problem.
One more for the toolbox, I guess.