Search
⌘K

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:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late July, 2024

Google

Google

Junior

Comments

Your account is free and you can post anonymously if you choose.