Dijkstra's algorithm is more efficient than _______ for finding the shortest path from a single source vertex to all other vertices in a graph with non-negative edge weights.

  • Bellman-Ford algorithm
  • Depth-First Search
  • Kruskal's algorithm
  • Prim's algorithm
Dijkstra's algorithm is more efficient than Bellman-Ford algorithm for finding the shortest path in a graph with non-negative edge weights. Dijkstra's algorithm has a time complexity of O((V + E) log V), where V is the number of vertices and E is the number of edges.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *