Insufficient and incorrect explanation
If the starting point is 5 in the midle on the matrix, then we can reach to Atlantic or Pacific ocean. (\nPacific ~   ~   ~   ~   ~ \n       ~  1   2   2   3  (
If the starting point is 5 in the midle on the matrix, then we can reach to Atlantic or Pacific ocean. (\nPacific ~   ~   ~   ~   ~ \n       ~  1   2   2   3  (5) *\n       ~  3   2   3  (4) (4) *\n->       ~  2   4  (5)  3   1  <-\n       ~ (6) (7)  1   4   5  *\n       ~ (5)  1   1   2   4  *\n          *   *   *   *   * Atlantic\nAlso, it is mentioned that the water can go either up, down, left or right, then how does flow reach from (7) to (5)\n\nPacific ~   ~   ~   ~   ~ \n       ~  1   2   2   3  (5) *\n       ~  3   2   3  (4) (4) *\n       ~  2   4  (5)  3   1  *\n       ~ (6) (7)  1   4   5  *\n       ~ (5)  1   1   2   4  *\n          *   *   *   *   * Atlantic\n\nCan someone please help me with the explanation here?
[]