Floyed-Warshall algorithm utilizes_______ to solve the all-pairs shortest paths problem on a directed graph in _____time.
A
Greedyalgorithm,⊝(V2logn)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Dynamicprogramming,⊝(V2logn)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Greedyalgorithm,⊝(V3)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Dynamicprogramming,⊝(V3)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution
The correct option is DDynamicprogramming,⊝(V3) Floyd-Warshall algorithm utilizes dynamic programming to solve the all-pairs shortest paths problem on a directed graph in ⊝(V3) time.
So, option (C) is correct.