跳轉到

台大碩班考試題目 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)

  1. 104. Maximum Depth of Binary Tree
  2. 98. Validate Binary Search Tree
  3. 169. Majority Element
  4. 28. Find the Index of the First Occurrence
  5. 150. Evaluate Reverse Polish Notation
  6. 232. Implement Queue using Stacks
  7. 207. Course Schedule
  8. 215. Kth Largest Element in an Array

第二階段:核心題型(Medium)

  1. 72. Edit Distance
  2. 1143. Longest Common Subsequence
  3. 743. Network Delay Time
  4. 1584. Min Cost to Connect All Points
  5. 416. Partition Equal Subset Sum
  6. 322. Coin Change
  7. 337. House Robber III

第三階段:進階挑戰(Hard)

  1. 23. Merge k Sorted Lists
  2. 295. Find Median from Data Stream
  3. 329. Longest Increasing Path in a Matrix
  4. 410. Split Array Largest Sum
  5. 51. N-Queens
  6. 968. Binary Tree Cameras
  7. 834. Sum of Distances in Tree

題目總數統計

分類 題目數量
動態規劃 15
樹結構 11
圖論 8
堆積 5
字串 4
棧/表達式 5
雜湊表 4
回溯 3
鏈表 3
總計 58

詳細分類