Learn
Practice
Newsletter
Resources
Resume
New
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Minimum Interval to Include Each Query
Bookmark
Input
Standard
Simple
No match
Custom
intervals
=
[[1,4],[2,4],[3,6],[4,4]]
,
queries
=
[2, 3, 4, 5]
intervals
[1,4]
[2,4]
[3,6]
[4,4]
heap:
empty
queries
2
3
4
5
result
?
?
?
?
algo
master
.
io
Step:
Find the smallest interval containing each query
0 / 23
Input
Standard
Simple
No match
Custom
intervals
=
[[1,4],[2,4],[3,6],[4,4]]
,
queries
=
[2, 3, 4, 5]
0 / 23
intervals
[1,4]
[2,4]
[3,6]
[4,4]
heap:
empty
queries
2
3
4
5
result
?
?
?
?
algo
master
.
io
Step:
Find the smallest interval containing each query