# Dijkstra vs Floyd-Warshall [duplicate]

I know this question is a bit redundant but I am trying to understand a subtle difference between Dijkstra Algorithm and Floyd-Warshall Algorithm. Can I say running Floyd-Warshall is equivalent to running Dijkstra on every vertex in the graph? In other word, Dijkstra will output the optimal path from a single source to other vertices at one runtime while Floyd algorithm does what Dijkstra does but for all vertices in at one runtime so Floyd does not require a source as an input.

Thank you

• "subtle difference" -- they work completely differently, what's subtle about that? – Raphael Nov 26 '15 at 22:57
• – Raphael Nov 26 '15 at 22:58

• Floyd-Warshall time complexity is $O(|V|^3)$. – Renato Sanhueza Nov 26 '15 at 18:08