why do we need Floyd-Warshalls algorithm?

Правка en1, от giorgi_pkhaladze, 2023-09-11 16:34:10

Hello codeforces! so as we know Floyd–Warshals algorithm finds the shortest path between all pairs of vertices and Bellman-Ford finds the shortest path from one note to all and if number of vertices will be_V and number of edges E then if we will run bellman ford from all vertices except one it will take o((v-1)*v*e) and floyd warshall takes o(v*v*v) that is mostly more than o((v-1)*v*e) am I right? So why do we need floyd warshalls algorithm?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский giorgi_pkhaladze 2023-09-11 16:34:10 490 Initial revision (published)