/** * 01背包问题 就最大价值 * [ * [0,0,5,5,5,5,5], * [0,0,5,5,5,10,10], * [0,3,5,8,8,10,13], * [0,3,5,8,8,10,13], * [0,3,5,8,8,10,13] * ] * * Math.max( dp[i - 1][j - weight[i]] + goods[i], dp[i - 1][j] ); */ declare const backpack: (goods: Array, weight: Array, maxWeight: number) => any; export default backpack;