---
# System prepended metadata

title: 排序練習題

---

# 排序練習題

## 基礎題

### 陣列排序

| 題號 | 題目名稱                                                                                                                    |               難度                | 備註 |
| ---- |:--------------------------------------------------------------------------------------------------------------------------- |:---------------------------------:| ---- |
| 88   | [Merge](https://leetcode.cn/problems/merge-sorted-array/)                                                                   | <font color=DarkGreen>Easy</font> |      |
| 75   | [Sort colors](https://leetcode.cn/problems/sort-colors/)                                                                    | <font color=DarkGreen>Easy</font> |      |
| 2418 | [Sort the people](https://leetcode.cn/problems/sort-the-people/)                                                            | <font color=DarkGreen>Easy</font> |      |
| 2037 | [Minimum number of moves to seat everyone](https://leetcode.cn/problems/minimum-number-of-moves-to-seat-everyone/comments/) | <font color=DarkGreen>Easy</font> |      |
| 1051 | [Height checker](https://leetcode.cn/problems/height-checker/)                                                              | <font color=DarkGreen>Easy</font> |      |
| 2089 | [Find target indices after sorting array](https://leetcode.cn/problems/find-target-indices-after-sorting-array/)            | <font color=DarkGreen>Easy</font> |      |

## 進階題

### 陣列排序
|題號|題目名稱|難度|
|-|-|-|
|912|[Sorting an array](https://leetcode.cn/problems/sort-an-array/)|<font color=Orange>Medium</font>|必須使用時間複雜度 **O(nlogn)**，超過就超時|
|2545|[Sort the students by their kth score](https://leetcode.cn/problems/sort-the-students-by-their-kth-score/)|<font color=Orange>Medium</font>|
|274|[H index](https://leetcode.cn/problems/h-index/)|<font color=Orange>Medium</font>||

### 鏈錶排序
| 題號 | 題目名稱| 難度 | 備註 | 題解 |
| ---- | ------------------------------------------------------------------------ | -------------------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| ----------------------------------------------------------- |
| 147  | [Insertion sort list](https://leetcode.cn/problems/insertion-sort-list/) | <font color=Orange>Medium</font> | | [鏈表插入排序題解](https://hackmd.io/@paxton0222/BJKi9PmTj) |
| 148  | [Sort list](https://leetcode.cn/problems/sort-list/)| <font color=Orange>Medium</font> |鏈表合併排序題目<br>前置:<br>[21. Merge two sorted lists](https://leetcode.cn/problems/merge-two-sorted-lists/)<br>[876. Middle of the linked list](https://leetcode.cn/problems/middle-of-the-linked-list/submissions/)|[排序鏈表題解](https://hackmd.io/@paxton0222/rkQ2QAX6i)|