Loading...
The Output Peak
A hard Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- hard
- Seniority
- senior
Problem
The data pipeline tracks daily throughput deltas: positive values mean more rows processed than the day before, negative values mean fewer. The team wants to find the best consecutive stretch of days where cumulative improvement was highest. Write a function that finds the contiguous subarray with the largest sum and returns both the sum and the subarray itself.
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.