29

前端学习算法2: 背包问题 ,一步一步思考(动态规划入门)

 5 years ago
source link: https://juejin.im/post/5c623ff3f265da2de1657f97
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
上一篇文章写了个爬楼梯的问题,没想到有很多人关注,趁热打铁,这次写背包问题(初级)。我的学习风格就是一步一步的实现,力求解释全面,可能会啰嗦。 1 背包问题 先举一个很通俗易懂的例子,也是图解算法中的例子,有一个只能装4kg的包,物品有音响3000元-重4k

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK