Floyd–Warshall algorithm (APSP All-Pairs Shortest Paths (APSP))

From Algorithm Wiki
Jump to navigation Jump to search

Time Complexity

$O(n^{3})$

Space Complexity

$O(n^{2})$ words

(Derived: Uses a $V \times V$ matrix to store and calculate distances)

Description

Approximate?

Exact

Randomized?

No, deterministic

Model of Computation

Word RAM

Year

1962

Reference

https://dl.acm.org/citation.cfm?id=368168