Design an API QPS Counter

Implement an in-memory API QPS counter. Record start_time when the server starts. Each request has a current timestamp in seconds (in an actual interview, system time may be used). Support the follo...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: