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

Function isZero

javascript/0073-set-matrix-zeroes.js:106–110  ·  view source on GitHub ↗
(matrix, row, col)

Source from the content-addressed store, hash-verified

104};
105
106var isZero = (matrix, row, col) => {
107 const [rowLeftEdge, colTopEdge] = [matrix[row][0], matrix[0][col]];
108
109 return rowLeftEdge === 0 || colTopEdge === 0;
110};
111
112/**
113 * Constant Space

Callers 1

setCellsToZeroFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected