Available question text
Count the number of length-n arrays with values in [1, m] such that, when scanning left-to-right, a new maximum is found exactly k times (i.e., there are k record-breaking elements), returning the result modulo 10^9+7. This is a combinatorics / dynamic-programming counting problem over record highs.
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 1420. Build Array Where You Can Find The Maximum Exactly K Comparisons
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source