Files
CategoryResourceRepost/极客时间专栏/数据结构与算法之美/加餐:春节7天练/春节7天练 | Day 7:贪心、分治、回溯和动态规划.md
louzefeng d3828a7aee mod
2024-07-11 05:50:32 +00:00

81 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<audio id="audio" title="春节7天练 | Day 7贪心、分治、回溯和动态规划" controls="" preload="none"><source id="mp3" src="https://static001.geekbang.org/resource/audio/af/74/afbbfa53eb94db1cfb059f15c829bd74.mp3"></audio>
你好,我是王争。今天是节后的第一个工作日,也是我们“春节七天练”的最后一篇。
## 几种算法思想必知必会的代码实现
### 回溯
<li>
利用回溯算法求解八皇后问题
</li>
<li>
利用回溯算法求解0-1背包问题
</li>
### 分治
- 利用分治算法求一组数据的逆序对个数
### 动态规划
<li>
0-1背包问题
</li>
<li>
最小路径和(详细可看@Smallfly整理的 Minimum Path Sum
</li>
<li>
编程实现莱文斯坦最短编辑距离
</li>
<li>
编程实现查找两个字符串的最长公共子序列
</li>
<li>
编程实现一个数据序列的最长递增子序列
</li>
## 对应的LeetCode练习题@Smallfly 整理)
- Regular Expression Matching正则表达式匹配
英文版:[https://leetcode.com/problems/regular-expression-matching/](https://leetcode.com/problems/regular-expression-matching/)
中文版:[https://leetcode-cn.com/problems/regular-expression-matching/](https://leetcode-cn.com/problems/regular-expression-matching/)
- Minimum Path Sum最小路径和
英文版:[https://leetcode.com/problems/minimum-path-sum/](https://leetcode.com/problems/minimum-path-sum/)
中文版:[https://leetcode-cn.com/problems/minimum-path-sum/](https://leetcode-cn.com/problems/minimum-path-sum/)
- Coin Change (零钱兑换)
英文版:[https://leetcode.com/problems/coin-change/](https://leetcode.com/problems/coin-change/)
中文版:[https://leetcode-cn.com/problems/coin-change/](https://leetcode-cn.com/problems/coin-change/)
- Best Time to Buy and Sell Stock买卖股票的最佳时机
英文版:[https://leetcode.com/problems/best-time-to-buy-and-sell-stock/](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)
中文版:[https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/](https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/)
- Maximum Product Subarray乘积最大子序列
英文版:[https://leetcode.com/problems/maximum-product-subarray/](https://leetcode.com/problems/maximum-product-subarray/)
中文版:[https://leetcode-cn.com/problems/maximum-product-subarray/](https://leetcode-cn.com/problems/maximum-product-subarray/)
- Triangle三角形最小路径和
英文版:[https://leetcode.com/problems/triangle/](https://leetcode.com/problems/triangle/)
中文版:[https://leetcode-cn.com/problems/triangle/](https://leetcode-cn.com/problems/triangle/)
到此为止,七天的练习就结束了。这些题目都是我精选出来的,是基础数据结构和算法中最核心的内容。建议你一定要全部手写练习。如果一遍搞不定,你可以结合前面的章节,多看几遍,反复练习,直到能够全部搞定为止。
学习数据结构和算法,最好的方法就是练习和实践。我相信这在任何知识的学习过程中都适用。
最后,祝你工作顺利!学业进步!