Start learning 50% faster. Sign in now
In an unweighted graph, Breadth-First Search (BFS) is optimal for finding the shortest path in terms of the number of edges. BFS explores all vertices at the current depth level before moving on to the next level, ensuring that the shortest path is found when the destination vertex is first encountered. For unweighted graphs, the edge count represents the path cost, and BFS efficiently identifies the shortest path by expanding vertices layer by layer. Why Other Options Are Incorrect: 1. Depth-First Search (DFS): DFS explores as far as possible along a branch before backtracking, which does not guarantee the shortest path in terms of edges. 2. Dijkstra’s Algorithm: While Dijkstra’s algorithm is used for weighted graphs, it is not necessary for unweighted graphs where BFS suffices. 3. Prim’s Algorithm: Prim’s algorithm is used for finding minimum spanning trees, not shortest paths. 4. Bellman-Ford Algorithm: While Bellman-Ford can handle negative weights, it is computationally expensive compared to BFS for unweighted graphs.
Consider the following statement about “CITIIS 2.0 Challenge”.
1. Recently, Union Minister of Road Transport inaugurated CITIIS 2.0 Challen...
In the union budget GoI said to support the Indian Institute of Millets Research, it is located in which city?
What was the theme for World Environment day this year?
What is the proposed increase in insurance coverage under the PMJJBY and PMSBY schemes?
India successfully developed and certified SEBEX 2, a new explosive that is 2.01 times more lethal than standard Trinitrotoluene (TNT). Which organizati...
Who is the author of the book “Dilip Kumar: In the Shadow of a Legend” ?
The International Cricket Council (ICC) has imposed a five-year period of ineligibility on which West Indies player for breaching multiple anti-corrupti...
Which India-born British man won the “Freedom of the city of London” award?
Which district in Bihar is set to become the state's second tiger reserve, in addition to the existing Valmiki Tiger Reserve?
What among the following notable achievement does Virat Kohli's record in T20 cricket underscore?