Re:Invert a binary tree on LeetCode
by SamReidHughes on Saturday June 13, 2015 @06:52AM
(#9710605)
I can't stand this. That's an equally intelligible description of the problem as the original.
Well it's a 140 character description from someone who's probably feeling a bit emotional. I'm sure he got a clearer problem description in the actual interview.
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.
> @rogerdai16 to min-max the tree, ascending to descending.
https://twitter.com/mxcl/status/608891015945170944