Skip to content

Commit 0ce0cb5

Browse files
authored
Merge pull request Snailclimb#1830 from SiQuan77/patch-1
希尔排序的空间复杂度有误
2 parents 694093d + e68cb18 commit 0ce0cb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/cs-basics/algorithms/10-classical-sorting-algorithms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public static int[] shellSort(int[] arr) {
259259

260260
- **稳定性**:稳定
261261
- **时间复杂度** :最佳:O(nlogn), 最差:O(n2) 平均:O(nlogn)
262-
- **空间复杂度**`O(n)`
262+
- **空间复杂度**`O(1)`
263263

264264
## 归并排序 (Merge Sort)
265265

0 commit comments

Comments
 (0)