UGC-NET | UGC NET CS 2015 Dec – III | Question 20

Floyd-Warshall algorithm utilizes __________ to solve the all-pairs shortest paths problem on a directed graph in __________ time.
(A) Greedy algorithm, θ (V3)
(B) Greedy algorithm, θ (V2 lgn)
(C) Dynamic programming, θ (V3)
(D) Dynamic programming, θ (V2 lgn)


Answer: (C)

Explanation: Floyd-Warshall algorithm utilizes dynamic programming to solve the all-pairs shortest paths problem on a directed graph in θ (V3) time.
For more information on Floyd-Warshall algorithm ReferDynamic Programming | Set 16 (Floyd Warshall Algorithm)
Option (C) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.