Find subarray with given sum (Non-negative Numbers)

Given a non-negative subarray of size n, we have to find the index of subarrays such that their sum is equal to the given sum k. Note: If there may be more than one subarrays then print first such subarrays...

Subscribe to our weekly newsletter

Join our community of 1000+ developers and stay updated with the fast moving world of computer science

We promsie, we won't spam
Even we hate spam as much as you hate them