Which of the following algorithms is used to find the shortest path in a graph…

2025

Which of the following algorithms is used to find the shortest path in a graph between a source vertex and all other vertices?

Answer: A. Dijkstra's AlgorithmDijkstra's Algorithm is used to find the shortest path in a graph from a source vertex to all other vertices.

  1. A.

    Dijkstra's Algorithm

  2. B.

    Kruskal's Algorithm

  3. C.

    Prim's Algorithm

  4. D.

    None of the above

Attempted by 310 students.

Show answer & explanation

Correct answer: A

Dijkstra's Algorithm is used to find the shortest path in a graph from a source vertex to all other vertices.

Explore the full course: Coding For Placement

Loading lesson…