Q. What happens when the value of k is 0 in the Floyd Warshall Algorithm?

  • (A) 1 intermediate vertex
  • (B) 0 intermediate vertex
  • (C) n intermediate vertices
  • (D) n-1 intermediate vertices
πŸ’¬ Discuss
βœ… Correct Answer: (B) 0 intermediate vertex
Explanation: when k=0, a path from vertex i to vertex j has no intermediate vertices at all. such a path has at most one edge and hence dij(0) = wij.

Explanation by: Mr. Dubey
when k=0, a path from vertex i to vertex j has no intermediate vertices at all. such a path has at most one edge and hence dij(0) = wij.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
724
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
98%
Success Rate