wiz-icon
MyQuestionIcon
MyQuestionIcon
3
You visited us 3 times! Enjoying our articles? Unlock Full Access!
Question

Which of the following algorithms solves the all-pair shortest path problem ?

A
Dijkstra's algorithm
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Floyd's algorithm
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
Prime's algorithm
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Warshall's algorithm
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B Floyd's algorithm

Floydwarshall algorithm is for solving the all pairs shortest path problem. The problem is to find shortest distances between every pair of vertices in a given edge weighted directed graph with positive or negative edge weights.

It does so by incrementally improving an estimate on the shortest path between two vertices, until the estimate is optimal.


935892_917484_ans_8fd8a71552c349098b03d08db7993862.PNG

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Introduction to Limits
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon