Need Help! IN CSES Graph Series in Shortest Route 2 problem it is accepting solution of floyd warshall algorithm while O(n*2logn) not (using dijkastra Priority queue).
#
I want to know , when It is benificial to use floyd warshall algorithm and when not ?
If $$$O(n^3)$$$ is allowed then it is very short to code floyd warshall. Also, floyd warshall works with negative edges too.
You can check this problem, which uses the idea used in floyd warshall.
Floyd-warshall finds the shortest path from all $$$i$$$ to $$$j$$$ in which internal nodes $$$\in (1, 2, \cdots, k)$$$. Here $$$i, j, k$$$ has the same meaning as described here