← ALL NOTES
Array

2302. Count Subarrays With Score Less Than K

Given a positive array nums and k: a subarray's score is (sum of elements)·(length). Count subarrays with score strictly less than k. Sliding window works because with positive numbers the score is…

Loading…