Leetcode 1450: Number of students doing homework at a given time
1 min readMay 25, 2020
In this Leetcode problem, w are given start and end working times for students, and should return how many students work at a given time queryTime
.
Solution
For each student i
, we know they work at queryTime
if and only if:
startTime[i] <= queryTime <= endTime[i]