CodingReported in a candidate post, Aug 2019
Count subarrays with sum less than or equal to k
Filed under OPPO · Also reported at Oppo R&D
The question
Given an array of n integers and a value k, for every possible length i from 1 to n, count the total subarrays whose sum of elements is less than or equal to k.
No write-up yet. Related questions below have one.
Related OPPO questions
Collected from public candidate posts and coding forums. Updated Nov 2026.