Available question text
Count the subarrays where the number of elements satisfying nums[i] % modulo == k is itself congruent to k modulo modulo. Reduce to prefix counts of matches taken modulo modulo and count pairs of prefixes where pref[j] ≡ pref[i] + k (mod modulo) — solvable with a running frequency map in linear time.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2845. Count of Interesting Subarrays
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source