1.

Floyd Warshall’s Algorithm can be applied on __________(a) Undirected and unweighted graphs(b) Undirected graphs(c) Directed graphs(d) Acyclic graphsThis question was posed to me in an online interview.This intriguing question comes from Shortest Path topic in division Shortest Path of Data Structures & Algorithms II

Answer»

Right CHOICE is (c) Directed graphs

Best explanation: Floyd Warshall Algorithm can be APPLIED in directed graphs. From a given directed graph, an ADJACENCY MATRIX is FRAMED and then all pair shortest path is computed by the Floyd Warshall Algorithm.



Discussion

No Comment Found

Related InterviewSolutions