What did you learn? Prefix sums turn subarray sum queries into two-point differences.
Monotonic deques can optimize searches over prefix values, not just array values.
The front removal differs from sliding window max: once an index gives a valid answer, it's consumed and removed.
Negative numbers complicate things. Without them, a simple two-pointer approach would work. You've solved a hard problem. If you understand it, you've mastered monotonic deques.