Math, asked by sharmagagan6772, 11 months ago

You are given an array of n numbers. Count the no. Of subarrays having the absolute value of sum strictly greater than k

Answers

Answered by rishika79
0

Answer:

Step-by-step explanation:

Input : arr[] = {10, 2, -2, -20, 10},

k = -10

Output : 3

Subarrays: arr[0...3], arr[1...4], arr[3..4]

have sum exactly equal to -10.

Input : arr[] = {9, 4, 20, 3, 10, 5},

k = 33

Output : 2

Subarrays : arr[0...2], arr[2...4] have sum

exactly equal to 33.

Hope it helps you.....

Similar questions