LeetCode --- 1450. Number of Students Doing Homework at a Given Time 解题报告
Posted 杨鑫newlfe
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1450. Number of Students Doing Homework at a Given Time 解题报告相关的知识,希望对你有一定的参考价值。
Given two integer arrays startTime
and endTime
and given an integer queryTime
.
The ith
student started doing their homework at the time startTime[i]
and finished it at time endTime[i]
.
Return the number of students doing their homework at time queryTime
. More formally, return the number of students where queryTime
lays in the interval [startTime[i], endTime[i]]
inclusive.
Example 1:
Input: startTime = [1,2,3], endTime = [3,2,7], queryTime = 4 Output: 1 Explanation: We have 3 students where: The first student started doing homework at time 1 and finished at time 3 and wasn\'t doing anything at time 4. The second student started doing homework at time 2 and finished at time 2 and also wasn\'t doing anything at time 4. The third studen
以上是关于LeetCode --- 1450. Number of Students Doing Homework at a Given Time 解题报告的主要内容,如果未能解决你的问题,请参考以下文章
算法leetcode1450. 在既定时间做作业的学生人数(多语言实现)
LeetCode 1224. 最大相等频率 / 1450. 在既定时间做作业的学生人数 / 655. 输出二叉树
LeetCode 1224. 最大相等频率 / 1450. 在既定时间做作业的学生人数 / 655. 输出二叉树
LeetCode136 Single Number, LeetCode137 Single Number II, LeetCode260 Single Number III