Leetcode in Java && Oracle
422 subscribers
8 photos
397 files
400 links
Second channel: @codeforces_java

Let's Develop Together!
Download Telegram
image_2021-10-18_15-20-14.png
32.8 KB
#N1450. Number of Students Doing Homework at a Given Time
problem link=>https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time/

#solution
class Solution {
public int busyStudent(int[] startTime, int[] endTime, int queryTime) {
int count=0;
for(int i=0; i<startTime.length; i++){
if(startTime[i]<=queryTime&&endTime[i]>=queryTime)
count++;
}

return count;
}
}