Approach 1: (Pos + Neg)
Map + Hashing
Intuition is
1 2 3 6
Prefix 1 3 6 12
| |
At each stage I check for sum-k
Meaning 12-6 is Required sum=6
Hence We know that subarray has sum = 6
We hash the sum at each step , But not hashing the same sum again,
Might lead to shorter sum if we update
Approach 2: For Pos only
Sliding window for sum = k
```cpp
/*
Problem is When sum increases we decrease the window,
But the problem is that sum can be decreased later by some negative value later
We are not counting that
eg->
-1 0 1 1) -1
As we reach high here we decrease the window, but see that
if we want k = 0
*/
```