## Find number of subarrays with given sum (with Negative numbers) – LeetCode Solution [Medium]

In the previous post, we discussed about finding the total number of continuous subarrays of a given array (of non-negative numbers) whose sum equals to k. In this post we’ll include negative numbers in the given array arr. Problem Statement https://leetcode.com/problems/subarray-sum-equals-k/ Example 1: Input: arr = [-1,-1,1], k = 0 Output: 1 Explanation: […]