Closed Abhikanksh-Chand closed 2 years ago
The program considers all subsets of items and calculates the total weight and value of all subsets. Consider the only subsets whose total weight is smaller than W. From all such subsets, pick the maximum value subset.
The program considers all subsets of items and calculates the total weight and value of all subsets. Consider the only subsets whose total weight is smaller than W. From all such subsets, pick the maximum value subset.