Implementation of the Floyd-Warshall all pairs shortest paths algorithm in C++ and Python, with testcases