📢 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 of the following is true for Dijkstra’s

      algorithm?
      A Works with negative edge weights Correct Answer Incorrect Answer
      B Finds shortest paths from a single source Correct Answer Incorrect Answer
      C Can detect cycles Correct Answer Incorrect Answer
      D Is used for Minimum Spanning Tree Correct Answer Incorrect Answer
      E Always uses DFS internally Correct Answer Incorrect Answer

      Solution

      Dijkstra’s algorithm computes shortest paths from a source node to all others, but cannot handle negative edge weights.

      Practice Next
      ask-question