Skip to content

Latest commit

 

History

History

NumberOfSubArraysHavingSumExactlyEqualToGivenNumberK

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Number of subarrays having sum exactly equal to k

Given an unsorted array of integers, find the number of subarrays having sum exactly equal to a given number k.

Input Forma

First line contains array and second line contains K.

Output Format

Print number of sub arrays having sum exactly equal to a given number k.

Sample Input 0

10 2 -2 -20 10
-10

Sample Output 0

3

Explanation

Self Explanatory

Ref Link

Number of subarrays having sum exactly equal to k