Is this all-pairs shortest path problem?


  • 0
    J

    Is this all-pairs shortest path problem?


  • 0
    A

    I don't think so, as the count of n (no. of vertices) is not given, using O(n^3) Floyd-Warshall could be a pain. Rather one can exploit the fact that its a binary tree. Good Luck!


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.