Open In App
Related Articles

Algorithms | Graph Shortest Paths | Question 11

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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

Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads