Loading...
The Gap Filler
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- mid
Problem
Our time-series pipeline has gaps where sensors report None. Write a function called forward_fill that takes a list with None values and carries the most recent non-None value forward. If None appears before any real value, it stays None - the downstream model needs to know there's no history.
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.