title: Is BFS best search algorithm?
body: <p>I know about Dijkstra's agorithm, Floyd-Warshall algorithm and Bellman-Ford algorithm for finding the cheepest paths between 2 vertices in graphs.</p>
  
  <p>But when all the edges have the same cost, the cheapest path is the path with minimal number of edges? Am I right? There is no reason to implement Dijkstra or Floyd-Warshall, the best algorithm is Breadth-First search from source, until we reach the target? In the worst case, you will have to traverse all the vertices, so the complexity is O(V)? There is no better solution? Am I right? </p>
  
  <p>But there are tons of articles on the internet, which talk about shortest paths in grids with obstacles and they mention Dijkstra or A*. Even on StackOverfow - <a href="https://stackoverflow.com/questions/5303538/algorithm-to-find-the-shortest-path-with-obstacles">Algorithm to find the shortest path, with obstacles</a>
  or here <a href="http://qiao.github.io/PathFinding.js/visual/" rel="nofollow noreferrer">http://qiao.github.io/PathFinding.js/visual/</a></p>
  
  <p>So, are all those people stupid? Or am I stupid? Why do they recommend so complicated things like Dijkstra to beginners, who just want to move their enemies to the main character in a regular grid? It is like when someone asks how to find the minimum number in a list, and you recommend him to implement heap sort and then take the first element from sorted array.</p>