Bellman-Ford algorithm can handle graphs with negative edge weights, but it has a higher _______ complexity compared to Dijkstra's algorithm.

  • Computational
  • Memory
  • Space
  • Time
Bellman-Ford algorithm has a higher time complexity compared to Dijkstra's algorithm. Its time complexity is O(VE), where V is the number of vertices and E is the number of edges. This is due to the algorithm's approach of relaxing edges iteratively for a fixed number of times.
Add your answer
Loading...

Leave a comment

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