Back to problems

Track simulations and report timeouts

Algorithm · Applied Intuition · Hard

You are building a liveness monitor for a large number of independent simulation runs. Each simulation emits ordered event records of the form (sim_id, type, timestamp). The event type is one of these: "start": sim_id becomes active again, and its last-activity timestamp becomes timestamp. "ping": sim_id is still running, and its last-activity timestamp is refreshed to timestamp. "end": sim_id finishes normally and is no longer active. A simulation is active after a "start"…

Checking your access…