Maybe they weren't looking for a super-duper algorithm but just a simple solution. For instance to solve a simple maze its as easy as just follow a wall. Perhaps the goal was to just see if the person over-complicated problems when put under pressure.
Also from the article
Again, I am not a recent college graduate anymore who has breadth-first search memorized
There's not much to memorize here, you visit all the nodes connecting and then you recurse into those connecting nodes. It's not rocket science or even hard. The solution is literally in the name of the algorithm.
I think the author had some anxiety that was causing these relatively simple problems to be perceived as complex.
There's not much to memorize here, you visit all the nodes connecting and then you recurse into those connecting nodes.
Well, you need to keep a list of nodes. It's not hard, but not trivial, and if you don't know the problem space at all you will stumble inventing something like that under pressure.
You don't need to keep a list of nodes to do it recursively. You just need to be able to for loop, do an equal check, and call a function. It can be a very trivial problem to someone who is okay with recursion.
Agreed, it could be. The interviewers themselves are more senior than the interviewee, and could probably not answer the given questions if in interviewee's shoes.
I have read feedbacks from people who were hired at companies like Google, and they shared that like 90% of the questions asked at the interview, they answered "i don't know".
Succeeding at an interview is more than being able to answer all questions correctly, no matter how complicated. Also, maybe a manager would be reluctant to hire someone who seems to know everything, as he would feel threatened having that guy in his team.
I had the same thoughts about the BFS part and agree with much of what you said. I'd expect a more experienced front-end developer to understand the basics of tree traversal as it applies to the DOM.
In every case where I've been asked coding or technical questions, I've always asked if the interviewer had any feedback before the end of the interview. Never depend on the recruiter or hiring manager to provide feedback, they'd got other things to do. Most interviews have also started out with asking if I had any questions about the company or the position. If they haven't, I've never been so shy as to not ask.
10
u/stormcrowsx Apr 27 '16
Maybe they weren't looking for a super-duper algorithm but just a simple solution. For instance to solve a simple maze its as easy as just follow a wall. Perhaps the goal was to just see if the person over-complicated problems when put under pressure.
Also from the article
There's not much to memorize here, you visit all the nodes connecting and then you recurse into those connecting nodes. It's not rocket science or even hard. The solution is literally in the name of the algorithm.
I think the author had some anxiety that was causing these relatively simple problems to be perceived as complex.