I came across a question that requires an alternate implementation converse to the normal Knapsack which is based on a 0-1 logic of considering whether or not to consider an item for the optimal solution. Instead, the alternate implementation is to consider what is the largest indexed job in the optimal solution.
Would you have any suggestions for how I can work with this?
Thanks!