Floyd Warshall algorithm works ?