Vidyalelo
Data Structure · Q30

Graph Algorithms (DFS, BFS, Dijkstras, etc)

Programming · Data Structure · question 30

Q30

How does the BFS algorithm ensure that the shortest path is found in an unweighted graph?

A.
By exploring nodes as deeply as possible.
B.
By randomly visiting nodes.
C.
By exploring all nodes at the current level before moving to the next level.
Answer
D.
By following the shortest edge.

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board