Expected Output for this test case

  • 0

    Hello all,

    For the following test case

    The expected output shows [0, 2] as one of the coordinates which can reach both the oceans. How is this possible? Can anyone provide me an explanation

  • 0

    Obviously [0,2] can reach the Pacific as it's already touching the top edge. To get to the bottom edge, it can take the path [0,1], [1,1], [1,2].

Log in to reply

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