Number of Students Doing Homework at a Given Time LeetCode solution in Java

1
class Solution {
2
public int busyStudent(int[] startTime, int[] endTime, int queryTime) {
3
int count = 0;
4
for (int i = 0; i < startTime.length; ++i) {
5
if (queryTime >= startTime[i] && queryTime <= endTime[i]) ++count;
6
}
7
return count;
8
}
9
}

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0