20 ms·
I would agree with you if the author had complained about depth-first search as opposed to breadth-first search. Any decent developer should be able to underst
by hexagonc 10y ago
I would agree with you if the author had complained about depth-first search as opposed to breadth-first search. Any decent developer should be able to understand and reason through depth-first search but I wouldn't expect breadth-first search to show up doing front-end web development. In my own side-projects, which involve much more complicated algorithms than anything I've implemented in my day job, breadth-first search has only really come up in one context that wasn't explicitly AI related, and that was a grammar parser. In every other case that I needed to search something, it was depth-first search that I was using. If you're given the whole tree at the beginning, I think most developers would probably start with depth-first search, even if they didn't know the name of the algorithm they were using.