If an interviewer wants to test problem solving skills with a BFS, no problem:
- Draw a tree on the whiteboard (interviewers writing the whiteboard is highly undervalued; it calms the candidate)
- Explain what a BFS is. It's easy to draw out each step in a BFS algorithm.
- Ask the candidate to write some pseudo code that implements it.
And they still failed it! It is not about trivia or what BFS is, it is all about can you reason about algorithms.
(Disclaimer: our actual interview problem is slightly different, but it it still a very basic CS one)
Okay.. so now this is about you and a bad candidate rather than the person pointing out that interviewing is broken. Got it.
Because someone saying "How would I know? If, and when, I need to know how tree-shaking is implemented, I will go look it up." makes me sad. The tree-shaking algorithm was not given to us by ancient gods. As a programmer, you job it is to solve problems no one has solved before. Interviewing may be indeed broken, but the original article was not showing any evidence of this.
I'll go a little further and say that if you've qualified a candidate as capable of busting out the routine Javascript required to wire up typical front-end code, if you can't teach that developer how to implement BFS within the confines of a single interview, you the interviewer share some of the incompetence. Certainly that would be the case for a manager or team lead!
The reality is that BFS is for most jobs (frontend AND backend) a trivia question, and a status-seeking mechanism for interviewers.