35 karma · joined April 10, 2014
Just because someone wrote on Twitter with limited number of characters that the problem was to "invert a binary tree", does not mean there were no clarification from the recruiter.
> And if they actually meant for you to recurse down and swap left and right on everything, it would dramatically lower my opinion of them because it would make me wonder if they knew the difference between how a binary tree is drawn on a whiteboard vs. how it is laid out in memory.
If you're thinking about making a real structure, I believe you should recurse down and swap. If you don't do this, rotating, joining etc, could be a real pain.
If you'd like to read more about it: http://calnewport.com/blog/
That being said, whatever floats your boat ;-)
Every time I read a novel written by Dukaj I start feeling smarter. The ideas presented by characters are always worth considering and eye-opening.