If that was the case, you think all of the biggest tech companies that have billions of dollars would continue using it? Did you ever consider that you might be wrong?
And when is the last time you had to balance a binary tree or write Djikstra’s algorithm from memory anyways?
I didn’t reproduce it from memory though (but I did choose to port a Java version in preference to any of the existing Python versions I found, because it’s code was structured in a way that I grokked much easier. Possibly due to my not totally expert idiomatic Python skills, I’m really a Perl coder deep down.)
(And I never had to do any whiteboard performative coding to land this gig either.)
Totally wouldn't work for Google Maps doing shortest path routing globally, but for an event with only a couple of hundred POIs and intersections, it's a cheat that seems almost magical to people who have some concept of the algorithmic problem, but haven't worked out the "trick".
If I were asked to whiteboard this, I would 100% be asking that constraints of the dataset up front. (I'm not too sure I'd have been smart enough to do that a couple of decades back, when I last had a "perform for us code-monkey!" type of job interview...)
No...
> at least not one that’s possible to administer cheaply.
Ah, yes. AFAIK, Behavioural interviewing works, but it does require training and thoughtfulness. You have to know what you're looking for, and ask questions specifically targeting that. You definitely cannot just throw a random employee into an interview with a list of questions and expect it to work.