We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9562a0 commit 7e1d1b5Copy full SHA for 7e1d1b5
number-of-students-doing-homework-at-a-given-time/export.go
@@ -0,0 +1,5 @@
1
+package index
2
+
3
+func BusyStudent(startTime []int, endTime []int, queryTime int) int {
4
+ return busyStudent(startTime, endTime, queryTime)
5
+}
number-of-students-doing-homework-at-a-given-time/go.mod
@@ -0,0 +1,3 @@
+module github.com/masx200/leetcode-test/number-of-students-doing-homework-at-a-given-time
+go 1.19
number-of-students-doing-homework-at-a-given-time/index.go
@@ -0,0 +1,10 @@
+func busyStudent(startTime []int, endTime []int, queryTime int) (ans int) {
+ for i, s := range startTime {
+ if s <= queryTime && queryTime <= endTime[i] {
6
+ ans++
7
+ }
8
9
+ return
10
0 commit comments