Search
⌘K

Leetcode 1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold

Count how many contiguous subarrays of length k have an average ≥ threshold — equivalently, how many sliding windows have sum ≥ k×threshold. This is a linear-time sliding-window problem suitable for arrays up to about 1e5 in length.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.