Start learning 50% faster. Sign in now
The Bellman-Ford Algorithm (C) is best suited for finding the shortest path in graphs that may have negative weights but no negative cycles. It works by relaxing the edges up to (V-1) times, where V is the number of vertices, ensuring it can handle negative weights and detect negative cycles. Why Other Options Are Wrong: A) Dijkstra's Algorithm: Dijkstra’s algorithm is faster than Bellman-Ford for graphs with non-negative weights but fails when negative weights are present, as it assumes all edge weights are positive. B) Kruskal's Algorithm: This is a Minimum Spanning Tree (MST) algorithm used to connect all nodes in a graph with minimum weight, not to find the shortest path between two nodes. D) Prim’s Algorithm: Like Kruskal’s, Prim’s algorithm is used for finding an MST, not for finding the shortest path in a graph with negative weights. E) Floyd-Warshall Algorithm: This algorithm computes shortest paths between all pairs of vertices and works for both positive and negative weights, but it is not optimal for solving single-source shortest path problems.
Which of the following is a secondary air pollutant :
With reference to the Fugitive Economic Offenders Act, 2018, consider the following statements.
1. A Fugitive Economic Offender is a person aga...
If the diameter of a capillary is doubled, then the rise of water in it will be –
Diamond and graphite are :
Which of the following reactions represents symbolic combination reaction?
In which year is the ratio of foreign investment approvals to foreign investment inflows highest?
The sum of the exponents of the prime factors in the prime factorization of 360 is
Hakki Pikki is a tribe of the Indian subcontinent, they mostly live in which state?
A man starts walking from his house towards the south. After walking 5 km, he turned to his left and walked 6 km. Then he walked further 5 km after turn...