4 ms·
I feel like it's a little weird that one of the author's big examples of a difficult algorithmic question is breadth-first search. While I agree it's not somet
by aetherson 11y ago
I feel like it's a little weird that one of the author's big examples of a difficult algorithmic question is breadth-first search. While I agree it's not something that's very likely to come up much in real work (especially for a front-end dev!), it's also... not actually hard? You check the current node for your truth condition, you add its children to a queue, you pop the queue and do the same thing for that node. If the queue is empty, you return false.
- reitoei 11y agoEverything is easy when you know how to do it.
- jldugger 11y ago> Everything is easy when you know how to do it. Yes? The point of an CS education is just as much to study well known algorithms and re-apply them to new contexts as it is to invent new ones. In fact, for most professionals, I'd argue the weighting is well slanted towards reapplication. Our dev team previously used FizzBuzz, and found that every applicant was passing it. So they wanted a new take home programming problem, and internally their most important criteria was 'demonstrates algorithmic thinking.' They mostly write and maintain simple Django webapps, so I thought this was a bit silly, and suggested if they wanted to measure that, give candidates a problem easily solvable with topological sort. Unfortunately they bit hard and only found out afterwards that pretty much no applicants solved the problem correctly. We still hired four people from that round. So in some sense, turnover within a year will mean that none of our dev team can pass their own interview.
- quantum_nerd 11y agovery true...
- koyote 11y agoI think that's what he meant by "[...] if I had looked at Dijkstra’s shortest path algorithm and breadth-first search one day before my interview, this would have been a trivial problem to solve [...].". Sure, BFS is 'easy' but it's not really something that stays fresh in your memory after years of not having to use it. I completely agree with his point that it if you have to study for an interview, the process is broken.
- aetherson 11y agoI mean... I'm 17 years out of college and I remember it. I don't have an implementation that I can just write out from memory or anything, but I remember the basics of how the algorithm works and I assume I could come up with an implementation that works.
- deleted 11y ago[deleted]
- mathgenius 11y agoI agree.. BFS can be seen as another example of Dijkstra's algorithm, so this seems to be a hole in the author's knowledge. Seems like he is just resenting these algorithms, and perhaps should spend some time hanging out with a textbook or something. Maybe write a game, that would be a fun way to get into this stuff. OTOH, I totally agree with the conclusion of the article: long interviews of technically complicated stuff is just BS. The last time I had to do this, I started refusing to answer questions after about two hours.