educative.io

Sliding window for the sum problem only for positive integer?

Could I know whether the sliding window approach could solve the integer…including the negative num/?

I tried to solve the problem “Maximum size subarray sum equals to K”?
But it can’t work

@Hua_Yang Can you elaborate your example here? It should work for negative numbers too.