Threshold Alerts

Problem Overview

  • Count alerts when the trailing average of calls over precedingMinutes exceeds alertThreshold at each minute.
  • Inputs: precedingMinutes, alertThreshold, and numCalls per minute; Output: total alert count; start evaluating only after enough data; constraints up to 1e5.
  • Real-world context: a compliance system monitoring inbound and outbound call volumes over time.
  • This coding interview question/problem comes from Goldman interviews.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: