Floyd-Warshall algorithm now done more efficiently.