Design a rate limiter that supports two operations: 1. hit(key, timestamp) — Record one access by a given key (e.g., an API client ID or user ID) at the specified timestamp. 2. allowed(key, timestamp) — Return whether the given key is still within the rate limit at the given timestamp…