Back to problems

Alert Monitor — Rolling Window + Severity Distribution + Spike Detection

Object-Oriented Programming · LinkedIn · Medium

Requirements Create a class that stores alerts labeled with both a timestamp and a severity, then supports these three operations: Alert timestamps are supplied in non-decreasing order, and the class does not need to support concurrent access. Examples For a most-recent timestamp of ts = 3720: The distribution is restricted to the hour bucket that begins at timestamp 3600, while the spike result gives the next strictly higher minute count for each listed minute.

Checking your access…