台大碩班考試題目 LeetCode 對照表
本文件整理了台大資料結構與演算法考試題目對應的 LeetCode 題目,方便練習。
必刷題目清單(按優先級排序)
⭐⭐⭐ 最高頻(出現 2-3 次)
| LeetCode |
題目名稱 |
難度 |
考試年份 |
| 23 |
Merge k Sorted Lists |
Hard |
110, 112 |
| 215 |
Kth Largest Element in an Array |
Medium |
113, 114 |
| 72 |
Edit Distance |
Medium |
113, 114 |
| 743 |
Network Delay Time (Dijkstra) |
Medium |
112, 114 |
| 28 |
Find the Index of the First Occurrence (KMP) |
Easy |
110, 112 |
| 1584 |
Min Cost to Connect All Points (MST) |
Medium |
110, 114 |
| 169 |
Majority Element |
Easy |
113, 114 |
⭐⭐ 高頻(出現 1 次,核心題型)
| LeetCode |
題目名稱 |
難度 |
考試年份 |
| 329 |
Longest Increasing Path in a Matrix |
Hard |
110 |
| 410 |
Split Array Largest Sum |
Hard |
113 |
| 51 |
N-Queens |
Hard |
112 |
| 295 |
Find Median from Data Stream |
Hard |
112 |
| 150 |
Evaluate Reverse Polish Notation |
Medium |
112 |
| 416 |
Partition Equal Subset Sum |
Medium |
110 |
| 207 |
Course Schedule |
Medium |
113 |
| 968 |
Binary Tree Cameras |
Hard |
114 |
| 1143 |
Longest Common Subsequence |
Medium |
114 |
刷題建議順序
第一階段:基礎必刷(Easy/Medium)
- 104. Maximum Depth of Binary Tree
- 98. Validate Binary Search Tree
- 169. Majority Element
- 28. Find the Index of the First Occurrence
- 150. Evaluate Reverse Polish Notation
- 232. Implement Queue using Stacks
- 207. Course Schedule
- 215. Kth Largest Element in an Array
第二階段:核心題型(Medium)
- 72. Edit Distance
- 1143. Longest Common Subsequence
- 743. Network Delay Time
- 1584. Min Cost to Connect All Points
- 416. Partition Equal Subset Sum
- 322. Coin Change
- 337. House Robber III
第三階段:進階挑戰(Hard)
- 23. Merge k Sorted Lists
- 295. Find Median from Data Stream
- 329. Longest Increasing Path in a Matrix
- 410. Split Array Largest Sum
- 51. N-Queens
- 968. Binary Tree Cameras
- 834. Sum of Distances in Tree
題目總數統計
| 分類 |
題目數量 |
| 動態規劃 |
15 |
| 樹結構 |
11 |
| 圖論 |
8 |
| 堆積 |
5 |
| 字串 |
4 |
| 棧/表達式 |
5 |
| 雜湊表 |
4 |
| 回溯 |
3 |
| 鏈表 |
3 |
| 總計 |
58 |
詳細分類