[Algorithm] 19 week(5.23 ~ 5.29) 3/3

Dev_min·2022년 5월 28일
0

algorithm

목록 보기
64/157

1450. Number of Students Doing Homework at a Given Time

var busyStudent = function(startTime, endTime, queryTime) {
    let count = 0;
    startTime.forEach((start, index) => {
        if(start <= queryTime && queryTime <= endTime[index]){
            count += 1;
        };
    });
    
    return count;
};
profile
TIL record

0개의 댓글