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

Function searchCols

javascript/0130-surrounded-regions.js:23–31  ·  view source on GitHub ↗
(board)

Source from the content-addressed store, hash-verified

21};
22
23var searchCols = (board) => {
24 const [rows, cols] = [board.length, board[0].length];
25
26 for (let col = 1; col < cols - 1; col++) {
27 /* Time O(COLS) */
28 dfs(board, 0, rows, col, cols); /* Space O(COLS) */
29 dfs(board, rows - 1, rows, col, cols); /* Space O(COLS) */
30 }
31};
32
33var searchGrid = (board) => {
34 const [rows, cols] = [board.length, board[0].length];

Callers 1

solveFunction · 0.70

Calls 1

dfsFunction · 0.70

Tested by

no test coverage detected