Skip to content

Commit

Permalink
Update 背包问题理论基础完全背包.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hailincai authored Aug 27, 2021
1 parent 4bbd571 commit fa309c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion problems/背包问题理论基础完全背包.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ dp状态图如下:
* [动态规划:关于01背包问题,你该了解这些!](https://programmercarl.com/背包理论基础01背包-1.html)
* [动态规划:关于01背包问题,你该了解这些!(滚动数组)](https://programmercarl.com/背包理论基础01背包-2.html)

就知道了,01背包中二维dp数组的两个for遍历的先后循序是可以颠倒了,一位dp数组的两个for循环先后循序一定是先遍历物品,再遍历背包容量。
就知道了,01背包中二维dp数组的两个for遍历的先后循序是可以颠倒了,一维dp数组的两个for循环先后循序一定是先遍历物品,再遍历背包容量。

**在完全背包中,对于一维dp数组来说,其实两个for循环嵌套顺序同样无所谓!**

Expand Down

0 comments on commit fa309c9

Please sign in to comment.