Skip to content

Commit f44f883

Browse files
committed
【update】链表排序
1 parent 6d2057d commit f44f883

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

C-算法/专题-A-数据结构.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,7 @@ public:
10021002

10031003
### 链表插入排序
10041004
> LeetCode/[147. 对链表进行插入排序](https://leetcode-cn.com/problems/insertion-sort-list/description/)
1005+
>> 注意:以下代码在[148. 排序链表](https://leetcode-cn.com/problems/sort-list/description/)也能 AC(要求时间复杂度 `O(NlogN)`
10051006
10061007
**问题描述**
10071008
```
@@ -1072,7 +1073,8 @@ public:
10721073
```
10731074
10741075
**代码 2 - 原地**
1075-
- 即不使用新链表,逻辑与数组一致
1076+
- 即不使用新链表,逻辑与数组一致;
1077+
- 此时链表拼接的逻辑会复杂一些
10761078
```C++
10771079
class Solution {
10781080
public:

0 commit comments

Comments
 (0)