Given an array of integers A and an integer k , find a subarray that contains the largest sum , subject to a constraint that the sum is less than k ?
I have an array of n integers . How many subarrays are contained in my array ?