Files
CategoryResourceRepost/极客时间专栏/数据结构与算法之美/加餐:春节7天练/春节7天练 | Day 2:栈、队列和递归.md
louzefeng d3828a7aee mod
2024-07-11 05:50:32 +00:00

94 lines
3.2 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 2栈、队列和递归" controls="" preload="none"><source id="mp3" src="https://static001.geekbang.org/resource/audio/87/e6/8751a31d986f0438ab8ae88fcfa84ce6.mp3"></audio>
你好,我是王争。初二好!
为了帮你巩固所学真正掌握数据结构和算法我整理了数据结构和算法中必知必会的30个代码实现分7天发布出来供你复习巩固所用。今天是第二篇。
和昨天一样,你可以花一点时间,来完成测验。测验完成后,你可以根据结果,回到相应章节,有针对性地进行复习。
## 关于栈、队列和递归的几个必知必会的代码实现
### 栈
<li>
用数组实现一个顺序栈
</li>
<li>
用链表实现一个链式栈
</li>
<li>
编程模拟实现一个浏览器的前进、后退功能
</li>
### 队列
<li>
用数组实现一个顺序队列
</li>
<li>
用链表实现一个链式队列
</li>
<li>
实现一个循环队列
</li>
### 递归
<li>
编程实现斐波那契数列求值f(n)=f(n-1)+f(n-2)
</li>
<li>
编程实现求阶乘n!
</li>
<li>
编程实现一组数据集合的全排列
</li>
## 对应的LeetCode练习题@Smallfly 整理)
### 栈
- Valid Parentheses有效的括号
英文版:[https://leetcode.com/problems/valid-parentheses/](https://leetcode.com/problems/valid-parentheses/)
中文版:[https://leetcode-cn.com/problems/valid-parentheses/](https://leetcode-cn.com/problems/valid-parentheses/)
- Longest Valid Parentheses最长有效的括号
英文版:[https://leetcode.com/problems/longest-valid-parentheses/](https://leetcode.com/problems/longest-valid-parentheses/)
中文版:[https://leetcode-cn.com/problems/longest-valid-parentheses/](https://leetcode-cn.com/problems/longest-valid-parentheses/)
- Evaluate Reverse Polish Notatio逆波兰表达式求值
英文版:[https://leetcode.com/problems/evaluate-reverse-polish-notation/](https://leetcode.com/problems/evaluate-reverse-polish-notation/)
中文版:[https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/](https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/)
### 队列
- Design Circular Deque设计一个双端队列
英文版:[https://leetcode.com/problems/design-circular-deque/](https://leetcode.com/problems/design-circular-deque/)
中文版:[https://leetcode-cn.com/problems/design-circular-deque/](https://leetcode-cn.com/problems/design-circular-deque/)
- Sliding Window Maximum滑动窗口最大值
英文版:[https://leetcode.com/problems/sliding-window-maximum/](https://leetcode.com/problems/sliding-window-maximum/)
中文版:[https://leetcode-cn.com/problems/sliding-window-maximum/](https://leetcode-cn.com/problems/sliding-window-maximum/)
### 递归
- Climbing Stairs爬楼梯
英文版:[https://leetcode.com/problems/climbing-stairs/](https://leetcode.com/problems/climbing-stairs/)
中文版:[https://leetcode-cn.com/problems/climbing-stairs/](https://leetcode-cn.com/problems/climbing-stairs/)
昨天的第一篇,是关于数组和链表的,如果你错过了,点击文末的“上一篇”,即可进入测试。
祝你取得好成绩!明天见!