Loading...

The Anomaly Detector

A hard Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
hard
Seniority
staff

Problem

The alerting pipeline needs to flag metric readings that deviate sharply from recent history, without hard-coding thresholds for every service. Write a function that scans a time series and reports any value that strays too far from the rolling average of the preceding data points.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.