Steady State
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Problem
A monitoring service buffers raw metric samples in `nums`, and the dashboard smooths the jitter by reporting the mean of each run of `k` consecutive samples, each value rounded to two decimals. Return one average per window, in sample order. When there are fewer than `k` samples there is nothing to smooth, so return an empty list.
Summary
Turn a jittery stream into a calm read, one step at a time.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.