Note that "invert" in this context is fairly ambiguous. I suspect the interviewer meant reverse, which is, I agree, utterly trivial.
I, and apparently many others in this thread, spent some time trying to ferret out an answer to what it would mean to invert a binary tree: at first thought it would imply a collection of nodes all pointing at their parents, which seems not very useful (and would require more than 10 lines of code to whiteboard reasonably).
Much of the discussion is about whether or not the problem was described in sufficient detail or not.