1.

Floyd Warshall Algorithm can be used for finding _____________(a) Single source shortest path(b) Topological sort(c) Minimum spanning tree(d) Transitive closureThe question was posed to me in homework.My doubt stems from Shortest Path topic in chapter Shortest Path of Data Structures & Algorithms II

Answer»

Correct answer is (d) Transitive closure

The best explanation: One of the ways to compute the transitive closure of a graph in THETA(N^3) time is to assign a weight of 1 to each edge of E and then run the Floyd WARSHALL Algorithm.



Discussion

No Comment Found

Related InterviewSolutions