shortest path between all vertices
- O(V^3)
- Some people write V^2. Which is correct?
- A naive implementation would be a triple loop, so V^3 is straightforward.
- Talk about reducing a little more only when there is no weight.
- So V^2 seems to be a mistake.
http://keita-matsushita.hatenablog.com/entry/2016/11/16/150225 https://ja.m.wikipedia.org/wiki/ワーシャル-フロイド法
This page is auto-translated from /nishio/ワーシャルフロイド法 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.