How Do You Find The Optimal Solution For A Knapsack Problem?
How Do You Find The Optimal Solution For A Knapsack Problem? After selecting item A, no more item will be selected. Hence, for this given set of items total profit is 24. Whereas, the optimal solution can be achieved by selecting items, B and C, where the total profit is 18 + 18 = 36.