(matrix)
| 7 | * @return {void} Do not return anything, modify matrix in-place instead. |
| 8 | */ |
| 9 | var setZeroes = function (matrix) { |
| 10 | const [rows, cols] = [matrix.length, matrix[0].length]; |
| 11 | const [_row, _col] = initTabu(rows, cols); /* Space (ROWS + COLS) */ |
| 12 | |
| 13 | fillPlacements( |
| 14 | matrix, |
| 15 | _row, |
| 16 | _col, |
| 17 | ); /* Time O(ROWS * COLS) | Space (ROWS + COLS) */ |
| 18 | setZero(matrix, _row, _col); /* Time O(ROWS * COLS) */ |
| 19 | }; |
| 20 | |
| 21 | const initTabu = (rows, cols) => [ |
| 22 | new Array(rows).fill(1) /* Space O(ROWS) */, |
nothing calls this directly
no test coverage detected