diff --git a/jungmyunggi/Set Matrix Zeroes.js b/jungmyunggi/Set Matrix Zeroes.js new file mode 100644 index 0000000..6b59f9e --- /dev/null +++ b/jungmyunggi/Set Matrix Zeroes.js @@ -0,0 +1,28 @@ +/** + * @param {number[][]} matrix + * @return {void} Do not return anything, modify matrix in-place instead. + */ + +var setZeroes = function(matrix) { + if(matrix.length === 1 && matrix[0].includes(0)){ + matrix[0].fill(0); + return matrix + } + const arr = [] + for(let i=0;i