NeetCode #157LC-362MediumArrays & Hashing
← Back to All Problems

#157 · #362 · Design Hit Counter(敲击计数器)

📌 Problem Statement & Constraints

Design a hit counter that counts hits in the past 5 minutes (300 seconds). Implement hit(timestamp) and getHits(timestamp). Timestamps are non-decreasing. Constraints: 1 <= timestamp <= 10^9; at most 300 calls to hit.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!