Hard
,Math
,DP
920. Number of Music Playlists
Your music player contains n
different songs. You want to listen to goal
songs (not necessarily different) during your trip. To avoid boredom, you will create a playlist so that:
Given n
, goal
, and k
, return the number of possible playlists that you can create. Since the answer can be very large, return it modulo 109 + 7.
Example 1:
Example 2:
Example3
Constraints:
k
< n
<= goal
<= 100