So, What if the numbers can also be negative?
We can't use sliding window algorithm then. First we will compute prefix sum and then sort it with their respective index (sort them as {prefixL[i],i}). Then we will apply binary search on it for every index i to look for an element whose index j is greater than index i and whose value is equal to prefixL[i] + K. This will take time.
