DataDrivenDataDriven
LearnPracticeInterviewDiscussDailyJobs

Out of Nowhere

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

Domain
Python
Difficulty
hard
Seniority
L6

Problem

A monitoring service emits readings as `(timestamp, value)` pairs in time order, and on-call wants the readings that jump away from their recent baseline. A reading is anomalous when it sits more than `threshold` population standard deviations from the mean of the `window` readings immediately before it, the current reading excluded. Skip the opening readings that lack a full `window` of history, and skip any reading whose prior window is perfectly flat.

Summary

Every stream has a rhythm. Find the readings that break it.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and checks it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons