Where the Deltas Settle
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant feedback.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Problem
A monitoring export hands you `nums`, a sequence of per-interval integer deltas that can be positive, negative, or zero. Count how many contiguous stretches of `nums` sum to exactly `k`.
Summary
Every stretch of the stream tells its own story. Count the ones that settle to your number.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and checks it automatically.