Count number of subarrays with arithmetic mean k
Anonymous User
10239

Given a target mean k, and array A, find the number of subarrays in array A such that the arithmetic mean is k.

Input: A = [1,3,4,5,6] k = 3
Answer: 2 # [3] and [1,3,4]
Comments (12)