Leetcode
Showing posts with label
knapsack
.
Show all posts
Showing posts with label
knapsack
.
Show all posts
Saturday, January 12, 2019
# Knapsack
›
0-1 背包问题 问题:给大小为n的数组weights[]和values[], 求在不超过W的情况下能取得的value总和最大是多少,每一个数只能最多取一次(或者不取) 本质是排列组合,复杂度O(2^n) public static void main(String[] ...
›
Home
View web version