Design Hit Counter
Count the hits received in the past 300 seconds. hit t records a hit at time t (seconds, non-decreasing) and getHits t prints the number of hits with timestamp greater than t - 300.
Constraints
1 <= q <= 300
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.