數(shù)據(jù)結構 datawhile課程學習
作業(yè)筆記 任務一
棧
1.用數(shù)組實現(xiàn)一個順序棧
Valid Parentheses(有效的括號)
英文版:https://leetcode.com/problems/valid-parentheses/
中文版:https://leetcode-cn.com/problems/valid-parentheses/
2.用鏈表實現(xiàn)一個鏈式棧
Longest Valid Parentheses(最長有效的括號)
英文版:https://leetcode.com/problems/longest-valid-parentheses/
中文版:https://leetcode-cn.com/problems/longest-valid-parentheses/
3.編程模擬實現(xiàn)一個瀏覽器的前進洒疚、后退功能
Evaluate Reverse Polish Notatio(逆波蘭表達式求值)
英文版:https://leetcode.com/problems/evaluate-reverse-polish-notation/
中文版:https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/
隊列
1.用數(shù)組實現(xiàn)一個順序隊列
2.用鏈表實現(xiàn)一個鏈式隊列
3.實現(xiàn)一個循環(huán)隊列
Design Circular Deque(設計一個雙端隊列)
英文版:https://leetcode.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-cn.com/problems/sliding-window-maximum/
就是在一個數(shù)組中,存在一個長度為k的窗口劈猿,每次把這個窗口向后移動1個單元把夸,把最大值取出放入list更振,直到窗口右端到達數(shù)組末尾為止,把最大值的數(shù)組list返回衰粹,這個C真心不好弄
鏈表
1.實現(xiàn)單鏈表端逼、循環(huán)鏈表、雙向鏈表述寡,支持增刪操作
2.實現(xiàn)單鏈表反轉
3.實現(xiàn)兩個有序的鏈表合并為一個有序鏈表
4.實現(xiàn)求鏈表的中間結點
Linked List Cycle I(環(huán)形鏈表)
英文版:https://leetcode.com/problems/linked-list-cycle/
中文版:https://leetcode-cn.com/problems/linked-list-cycle/
Merge k Sorted Lists(合并 k 個排序鏈表)
英文版:https://leetcode.com/problems/merge-k-sorted-lists/
中文版:https://leetcode-cn.com/problems/merge-k-sorted-lists/