Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可能的问题 #21

Closed
CG-banana opened this issue Mar 4, 2021 · 1 comment
Closed

可能的问题 #21

CG-banana opened this issue Mar 4, 2021 · 1 comment

Comments

@CG-banana
Copy link

在背包问题中的注意段落 最后一句写 “完全背包对物品的迭代放在里层,外层的体积或价值正向遍历。” 作者的code写的也是外层是物品的贴袋 内层是体积或者价值, 不知道是我理解错了还是这里没写清楚,请指正。

谢谢分享这本书给大家。

@changgyhub
Copy link
Owner

谢谢支持!当二维DP问题行和列可以互换的时候,内外都可以,这个还是要具体情况具体分析,建议画出状态转移矩阵或写出状态转移方程辅助判断。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants