NeetCode #746LC-920Hard2-D Dynamic Programming
← Back to All Problems

#746 · #920 · Number of Music Playlists(播放列表的数量)

📌 Problem Statement & Constraints

You build a playlist of length goal from n distinct songs. Every song must be played at least once, and a song may repeat only if at least k other songs have been played since its last occurrence. Return the number of playlists modulo 1e9+7. Constraints: 0 <= k < n <= 100, 1 <= goal <= 100.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!