Given weights and values of n items, we need to put these items in a knapsack of capacity W to get the maximum total value in the knapsack.