I gave this example on Reddit this morning, but I'll repeat it. If a programmer was given an array of elements [a1, a2, a3, a4, ..., an-1, an] and asked to produce the array [a2, a1, a4, a3, ..., an, an-1] and couldn't do it, he'd be the laughing stock of /r/programming for a couple of days and we'd hear about this problem for years to come, the same way we hear about FizzBuzz. Certainly a programmer should know how to traverse an array and manipulate its elements!
For the case of inverting a binary tree, we haven't gotten a clear answer to what it means, but the concensus seems to be to swap every left and right nodes in the tree. Well, that's exactly like the array problem above: traverse the structure and manipulate its elements! The traversal is not a simple loop, you use recursion (or if you're fancier, use an explicit stack to avoid causing an overflow of the call stack), but I'd argue that recursion is a fundamental notion for a programmer to know.
A commenter on Reddit mentioned that there's a difference between programmers and computer scientists and that the programmer is responsible for writing software and the computer scientists are responsible for coming up with algorithms and data structures. But then, what do the programmers use? If we cannot expect them to know about trees, what about linked lists? Resizable arrays? Hash tables? Graphs? These data structures are extremely important tools for creating solutions, shouldn't programmers be aware of them and how to use them?
1. I think phrasing matters a lot. Saying "invert a binary tree" creates an immediate suspicion in my mind that what I'm really being asked is not "do you know how to swap elements", but rather some kind of weeding-out trivia looking for a specific, probably named-after-a-person, algorithm they're expecting me to remember from a college course (tricky for me in particular, as I didn't do CS in college).
2. A whole lot depends on the context of the interview. While I know what a binary tree is and how it works, I've never -- in 11 years of programming professionally, and several more as a recreational/amateur before that -- actually needed to implement or even explicitly use one. There are a lot of things people will deride lack of knowledge of, things that people will consider to be hugely important CS fundamentals, that can literally just never come up in a lot of programmers' careers because they are not actually universally fundamental in all fields of programming.
So jumping into things that aren't relevant to the field you're interviewing for can achieve the opposite of what the interviewer hopes for: it's putting the candidate off-balance, but in the wrong way by making them wonder if they're interviewing for the wrong job or misunderstood what the job actually involved. Which in turn is going to affect their performance.
For the case of inverting a binary tree, we haven't gotten a clear answer to what it means, but the concensus seems to be to swap every left and right nodes in the tree. Well, that's exactly like the array problem above: traverse the structure and manipulate its elements! The traversal is not a simple loop, you use recursion (or if you're fancier, use an explicit stack to avoid causing an overflow of the call stack), but I'd argue that recursion is a fundamental notion for a programmer to know.
A commenter on Reddit mentioned that there's a difference between programmers and computer scientists and that the programmer is responsible for writing software and the computer scientists are responsible for coming up with algorithms and data structures. But then, what do the programmers use? If we cannot expect them to know about trees, what about linked lists? Resizable arrays? Hash tables? Graphs? These data structures are extremely important tools for creating solutions, shouldn't programmers be aware of them and how to use them?