Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 920. Number of Music Playlists
Count the number of length-goal sequences using n distinct songs such that every song appears at least once and a song can be replayed only after k other songs have been played, returning the result modulo 1e9+7. This is a combinatorics/DP problem (inclusion–exclusion or recurrence) to account for permutations and the cooldown constraint with n ≤ goal ≤ 100.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late July, 2024
Junior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.