Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1866. Number of Ways to Rearrange Sticks With K Sticks Visible
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.