Available question text
Count the number of length-5 subsequences whose middle element is the unique mode (i.e., appears strictly more times than any other value in the five), returning the result modulo 1e9+7. The core challenge is combinatorial counting for each index as the middle—using prefix/suffix frequencies to count ways to pick two left and two right elements so the middle value’s frequency strictly exceeds all others.
Related questions
Continue with questions that share topics or the same question type.
- Subsequences with a Unique Middle Mode II
Coding
- Number of Unique Good Subsequences
Coding
- Unique Length-3 Palindromic Subsequences
Coding
- Unique Middle Element
Coding · Array · Counting
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 3395. Subsequences with a Unique Middle Mode I
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source