MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / getMatrix

Function getMatrix

javascript/0417-pacific-atlantic-water-flow.js:31–34  ·  view source on GitHub ↗
(rows, cols)

Source from the content-addressed store, hash-verified

29};
30
31var getMatrix = (rows, cols) =>
32 new Array(rows)
33 .fill() /* Time O(ROWS * COLS) | Space O(ROWS * COLS) */
34 .map(() => new Array(cols).fill(false));
35
36var searchRows = (heights, rows, cols, pacificReachable, atlanticReachable) => {
37 for (let row = 0; row < rows; row++) {

Callers 2

searchFunction · 0.85
bfsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected