Open In App

Algorithms | Graph Shortest Paths | Question 11

Given a directed graph where weight of every edge is same, we can efficiently find shortest path from a given source to destination using?
 

(A)



Breadth First Traversal

(B)



Dijkstra\’s Shortest Path Algorithm

(C)

Neither Breadth First Traversal nor Dijkstra\’s algorithm can be used

(D)

Depth First Search

Answer: (A)
Explanation:

With BFS, we first find explore vertices at one edge distance, then all vertices at 2 edge distance, and so on.
 

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :