JavaScript 96% | Simple Solution
\n\nDoing the Blind 75 List and posting all solutions.\n\n\nvar pacificAtlantic = function(heights) {\n  const oceanMap = Array(heights.length).fill().map(_ => 
![image](https://assets.leetcode.com/users/images/911f9a98-02ff-4409-a8ee-4d765dd85788_1633908034.6486025.png)\n\nDoing the Blind 75 List and posting all solutions.\n\n```\nvar pacificAtlantic = function(heights) {\n  const oceanMap = Array(heights.length).fill().map(_ => Array(heights[0].length).fill(0))\n  const pTrack = new Set(), aTrack = new Set();\n  const res = [];\n  \n  for (let i = 0; i < heights[0].length; i++) {\n    traverse(0, i, pTrack)\n    traverse(heights.length - 1, i, aTrack)\n  }\n  \n  for (let i = 1; i < heights.length; i++) {\n    traverse(i, 0, pTrack)\n    traverse(heights.length - 1 - i, heights[i].length - 1, aTrack)\n  }\n    \n  return res\n  \n  function traverse(row, col, ocean) {\n    if (ocean.has(`${row}-${col}`)) return;\n    ocean.add(`${row}-${col}`);\n    oceanMap[row][col]++;\n    if (oceanMap[row][col] === 2) res.push([row, col]);\n    (row > 0 && heights[row][col] <= heights[row - 1][col]) && traverse(row - 1, col, ocean);\n    (row < heights.length - 1 && heights[row][col] <= heights[row + 1][col]) && traverse(row + 1, col, ocean);\n    (col > 0 && heights[row][col] <= heights[row][col - 1]) && traverse(row, col - 1, ocean);\n    (col < heights[row].length - 1 && heights[row][col] <= heights[row][col + 1]) && traverse(row, col + 1, ocean)\n  }\n};\n```
['JavaScript']