Unbroken
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- junior
Problem
A linac logs a dose reading each cycle, and a fault is only worth investigating when the machine sits at or above its safe ceiling for several cycles back to back. Given the readings and that ceiling, return the length of the longest unbroken stretch that stayed at or above it.
Summary
A single dip resets the clock. Find the longest the machine held over the line.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.