Question: This looks like an algorithm question, but it is more like probably, permutation, combination problem I guess. {:3 Music Mark likes to listen to music
This looks like an algorithm question, but it is more like probably, permutation, combination problem I guess.

{:3 Music Mark likes to listen to music while travelling. His iPod'\" contains N songs and he wants to listen to t. (not necessarily different} songs during a trip. So he creates a playlist such that: 0 Every song is played at least once. I A song can be played again only if at least K other songs have been played Mark wants to know how many different playlists are possible. Can you help Mark determine this number? As the number can be very large, display number modulo 1,000,000,001 You are given N, K and L You have to complete the function with the following function signature: int numOfPlaylislsUnt N, int K int L} { } ConstIaints 0 N lies between land 100, inclusive. 0 it lies between 0 and N, inclusive. 0 1 lies between N and 100, inclusive. Sample Inputamo: 1 0 3 Sample Output #00: 1 Explanation #00: N = T, so there is only 1 song in the iPod\". K = 0 so the song can be played as often as you want. t. = 3, and the only valid 3-song playlist is: {song_1, song_1, song_1}. Sample Input#01: 1 1 3 Sample Output #01: 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
