How to maintain an adding a new edge to the graph and efficiently update Floyd-Warshall all-pairs distances? Floyd-Warshall algorithm uses distances matrix, how we can update it after adding a new edge to the graph?
We can rerun Floyd-Warshall Algorithm, and it will take O(V^3). Can we make it faster?