Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
labuladong 70d1729ecc | 4 years ago | |
---|---|---|
.. | ||
README.md | 4 years ago | |
动态规划之KMP字符匹配算法.md | 4 years ago | |
动态规划之博弈问题.md | 4 years ago | |
动态规划之四键键盘.md | 4 years ago | |
动态规划之正则表达.md | 4 years ago | |
动态规划设计:最长递增子序列.md | 4 years ago | |
动态规划详解进阶.md | 4 years ago | |
团灭股票问题.md | 4 years ago | |
子序列问题模板.md | 4 years ago | |
抢房子.md | 4 years ago | |
最优子结构.md | 4 years ago | |
最长公共子序列.md | 4 years ago | |
编辑距离.md | 4 years ago | |
贪心算法之区间调度问题.md | 4 years ago | |
高楼扔鸡蛋进阶.md | 4 years ago | |
高楼扔鸡蛋问题.md | 4 years ago |
我们公众号最火的就是动态规划系列的文章,也许是动态规划问题有难度而且有意思,也许因为它是面试常考题型。不管你之前是否害怕动态规划系列的问题,相信这一章的内容足以帮助你消除对动态规划算法的恐惧。
具体来说,动态规划的一般流程就是三步:暴力的递归解法 -> 带备忘录的递归解法 -> 迭代的动态规划解法。
就思考流程来说,就分为一下几步:找到状态和选择 -> 明确 dp 数组/函数的定义 -> 寻找状态之间的关系。
这就是思维模式的框架,本章都会按照以上的模式来解决问题,辅助读者养成这种模式思维,有了方向遇到问题就不会抓瞎,足以解决一般的动态规划问题。
欢迎关注我的公众号 labuladong,方便获得最新的优质文章:
No Description
Markdown SVG
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》