blooms describes when they flower: blooms[i] = [start, end] means plant i is in bloom from day start through day end, inclusive.
The array visits lists when visitors come: visits[j] is the day visitor j arrives.
Return an array of the same length as visits whose j-th element is the number of plants in bloom on the day visitor j arrives.blooms=[[2, 5], [4, 8], [10, 10]], visits=[4, 9, 10, 1] → [2, 0, 1, 0]
On day 4 the first two plants are in bloom. On day 9 nothing is: the second finished on day 8 and the third has not opened yet. On day 10 only the third blooms, and on day 1 none do.
blooms=[[1, 3], [3, 3]], visits=[3, 3] → [2, 2]
Both ends are inclusive: on day 3 both plants are in bloom, so each visitor sees two.
blooms=[[2, 5], [4, 8], [10, 10]], visits=[4, 9, 10, 1]
[2, 0, 1, 0]
Run checks the first 3 tests in your browser. Submit checks all 102 tests on the server, hidden ones included.