30:00
Return a list of grid coordinates where water can flow to both the Pacific and Atlantic oceans.
m==heights.lengthm == \text{heights.length}m==heights.length
n==heights[r].lengthn == \text{heights}[r].\text{length}n==heights[r].length
1≤m,n≤2001 \leq m, n \leq 2001≤m,n≤200
0≤heights[r][c]≤1050 \leq \text{heights}[r][c] \leq 10^50≤heights[r][c]≤105
Start
1
2
3
5
4
6
7