upvote
I'd always heard inverting a binary tree thrown around as some kind of absurdly hard problem. I took a look at it and it was trivial. I was able to do it on the first attempt with no preparation. (And the point of these interviews is that you study for them, right?)

It's a contrived scenario, but the whole point is that it measures min(a,b) where `a` is your ability to think, and `b` is your ability to prepare (and memorize answers ahead of time). (I'd personally try to find ways to measure `a` instead of `b`, maybe by asking questions people wouldn't have heard before.)

reply
deleted
reply
I am not sure A is more important than B for the majority of jobs.
reply
I had an interview where I was asked to implement a data structure. I transparently told the interviewer I hadn't thought about that particular data structure since university, and that I was looking it up on Wikipedia to see how it worked before I wrote the implementation. I got that job.
reply
Being able to reverse a binary tree isn't something you need to memorize. If you can't do that it tells me that you're not fluent in your chosen programming language.
reply