> I often think what would Google/Facebook would be like if they hired in some experienced engineers that may not be able to whiteboard a BFS tree or can tell you Djikstra's algorithm
I think this happens less than people think. I've been at two big tech companies and interviewed people while at both (and obviously was interviewed myself).
I think what trips people up is that many questions have solutions that are given by "named" CS algorithms like the ones you listed, but also have simpler solutions that are fine too. And honestly, candidates that invoke named algorithms and (maybe eventually regurgitate the textbook algorithm) are often not the good ones (to me at least). Most problems like this often have simplifications that good candidates take advantage of to do something custom (and much simpler) than the "named" algorithms.
Basically, if I'm interviewing you and you regurgitate a famous algorithm... well I'm not going to ding you if you do it correctly, but in my experience, I'm much more likely to give a good review to someone that methodically works out a simple solution instead. Often the people that successfully dig up a named algorithm and apply it can't talk about it very well.
So, I suspect that a lot of the people that complain about not knowing a famous algorithm in an interview simply failed to work out a simpler solution to a simpler problem and didn't realize it.
But you are expected to find the most optimal solution to a problem, and not just a brute force one. And usually an optimal approach would require advanced knowledge of algorithms and data structures.
> But you are expected to find the most optimal solution to a problem, and not just a brute force one.
I'm not talking about brute force solutions. For many problems, there are things in between <famous algorithm> and brute force. Some problems offer simplifications over more general problems where <famous algorithm> is strictly worse than a simpler, more customized solution (same efficiency, but simpler to write and understand).
I think this happens less than people think. I've been at two big tech companies and interviewed people while at both (and obviously was interviewed myself).
I think what trips people up is that many questions have solutions that are given by "named" CS algorithms like the ones you listed, but also have simpler solutions that are fine too. And honestly, candidates that invoke named algorithms and (maybe eventually regurgitate the textbook algorithm) are often not the good ones (to me at least). Most problems like this often have simplifications that good candidates take advantage of to do something custom (and much simpler) than the "named" algorithms.
Basically, if I'm interviewing you and you regurgitate a famous algorithm... well I'm not going to ding you if you do it correctly, but in my experience, I'm much more likely to give a good review to someone that methodically works out a simple solution instead. Often the people that successfully dig up a named algorithm and apply it can't talk about it very well.
So, I suspect that a lot of the people that complain about not knowing a famous algorithm in an interview simply failed to work out a simpler solution to a simpler problem and didn't realize it.