Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can we use sorting and two-pointer approach here?
Sort the queries array and logs array based on time in increasing order.
For every window of size x, use sliding window and two-pointer approach to find the answer to the queries.