📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Which algorithm is best suited to find the shortest path

      in a graph with negative edge weights but no negative cycles?
      A Dijkstra’s Algorithm Correct Answer Incorrect Answer
      B Kruskal’s Algorithm Correct Answer Incorrect Answer
      C Bellman-Ford Algorithm Correct Answer Incorrect Answer
      D Floyd-Warshall Algorithm Correct Answer Incorrect Answer
      E Topological Sort Correct Answer Incorrect Answer

      Solution

      Bellman-Ford handles negative edge weights safely, unlike Dijkstra’s algorithm.

      Practice Next
      ask-question