Given an array of integers A and an integer B, find and return the maximum value K such that there is no subarray
in A of size K with sum of elements greater than B.
The first argument given is the integer array A. The second argument given is integer B.
Return the maximum value of K (sub array length).
1 <= length of the array <= 100000 1 <= A[i] <= 10^9 1 <= B <= 10^9
Input 1: A = [1, 2, 3, 4, 5] B = 10 Output 1: 2 Input 2: A = [5, 17, 100, 11] B = 130 Output 2: 3
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.