Comment by visarga

11 years ago

If they said "swap left & right at each node" it would have been easy. But they used a term that doesn't even yield an example in google searches - what kind of "inversion" do they have in mind? It's as if everyone is on the same page but me.

You're allowed to ask your interviewer for clarification. You'll even get brownie points for asking smart questions.

"Invert a binary tree" and "inverting a binary tree" both give me as the first result in Google this Quora question where someone gives an example and asks how to do it: http://qr.ae/7NDCg4