Loading...
Subarray Signal
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid
Problem
Our financial analytics engine needs to find the most profitable contiguous trading window. Write a function that takes a list of daily P&L values (possibly negative) and returns the maximum sum achievable by any contiguous subarray of at least one element.
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.