Leetcode 362. Design Hit Counter
Design a hit counter that records timestamps of hits and returns the number of hits in the past 5 minutes (300 seconds). The challenge is to support high-frequency record and query operations efficiently by maintaining a sliding-window summary (e.g., queue or fixed-size circular buffer) that discards expired hits.
Asked at:
Apple
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early August, 2025
Apple
Staff
Late July, 2025
Apple
Mid-level
LeetCode 362
Late July, 2025
Apple
Senior
Your account is free and you can post anonymously if you choose.