• + 2 comments

    Hi!

    I am having timeouts from testcase #2 and I am running out of ideas to improve the performance.

    I am just doing a bfs to find the path between the pairs , and then calculate the max value in the path.

    Is it worth to pre calculate all the shortests paths between all vertexs? caching the paths?

    Any hints will be welcomed :)

    Jordi Berges