Hacker News new | past | comments | ask | show | jobs | submit login

What's the deal with the warp searching question? There are both depth and breadth first algorithms that can handle cycles. Bit annoying since the example I had in mind was Djikstra's but it turned out that was classified as a BFS instead of DFS like I thought it was. Finding the shortest path from A to D in 4 steps for example seemed more "depth" to me, but maybe the algorithm as a whole doesn't neatly fit into either.



I think you're misunderstanding the point of the question. BFS is guaranteed to find you a shortest path in terms of "# of hops" in an unweighted graph. DFS is not.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: