Given an unsorted array arr[] of N integers and a sum. The task is to count the number of subarrays which add to a given number.
- Time : O(n)
- Space : O(n)
1 | class Solution { |
Given an unsorted array arr[] of N integers and a sum. The task is to count the number of subarrays which add to a given number.
1 | class Solution { |