Incident Monitor with a 30-Second Sliding Window

Implement an Incident Monitor that processes error transaction logs arriving in non-decreasing timestamp order.

Each log has the form:

<timestamp> <merchant_id> <error_status_code>

...

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: