I\'m trying to implement Bounded Knapsack Problem in O(NW) time and O(W) space, where N is number of items and W is capacity.
Bounded Knapsack Problem: