I am using VB.net 2012 and am wanting to do the following in code:
I have a list of media items that is of length x.
Each item in the list has a duration of y.
I am wanting to create a new random list that has a total duration of z, and the items can only appear once in this new list.
What is the best way to do this? I am not sure if this qualifies as a ‘rucksack problem.’ Either way, may I please have some help to achieve this, either with pseudo code or actual vb.net code?
Pseudocode: