Subarray Sum Less Than K (IB)
Sliding Window
Problem
Your are given an array of positive integers nums
.
Count and print the number of (contiguous) subarrays where the sum of all the elements in the subarray is less than k
.
For example:
Solution
Last updated
Was this helpful?