[Algorithm] 25 week(7.04 ~ 7.10) 1/3

Dev_min·2022년 7월 4일
0

algorithm

목록 보기
78/157

1351. Count Negative Numbers in a Sorted Matrix

var countNegatives = function(grid) {
    let count = 0;
    
    grid.forEach((numbers) => numbers.forEach(number => {
        if(number < 0){
            count++
        }
    }));
    
    return count;
};
profile
TIL record

0개의 댓글