Introduction - If you have any usage issues, please Google them yourself
Knapsack problem is a greedy algorithm with the optimal solution may be a typical problem. Knapsack problem with the nature of the optimal sub-structure, first of all, quick sort algorithm to sort items in accordance with the smallest unit, and then choose to greed.