Available question text
Count how many permutations of 1..n have exactly k left-to-right visible sticks (records) — a combinatorics/DP counting problem where placing the largest stick either creates a new visible stick or not, yielding a simple recurrence solved modulo 1e9+7.
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 1866. Number of Ways to Rearrange Sticks With K Sticks Visible
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source