Available question text
Count the number of contiguous subarrays whose maximum element occurs at least k times; the challenge is to avoid brute force by efficiently using the positions/frequencies of candidate maximum values (n up to 1e5) to count valid subarrays.
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 2962. Count Subarrays Where Max Element Appears at Least K Times
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source