> ability to reverse a b tree on the whiteboard
I can never get over how this became a thing. Was listening to a Brian Cox video on YouTube the other night (something about his voice helps me sleep). He said "I don't memorize formulas, it's easy to look them up."
If you ever need to reverse a b tree (in 30+ years of writing code, I never have) it's easy to look that up. It tells me nothing about your ability as a developer of real software that you spent time memorizing trivia before an interview.
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.)
I am not sure A is more important than B for the majority of jobs.
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.
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.