mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-24 02:14:00 +08:00
6.2 KiB
6.2 KiB
title | type | weight |
---|---|---|
2.14 ✅ Sort | docs | 14 |
Sort
- 深刻的理解多路快排。第 75 题。
- 链表的排序,插入排序(第 147 题)和归并排序(第 148 题)
- 桶排序和基数排序。第 164 题。
- "摆动排序"。第 324 题。
- 两两不相邻的排序。第 767 题,第 1054 题。
- "饼子排序"。第 969 题。
No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity | Favorite | Acceptance |
---|---|---|---|---|---|---|---|
0056 | Merge Intervals | [Go]({{< relref "/ChapterFour/0001~0099/0056.Merge-Intervals.md" >}}) | Medium | O(n log n) | O(log n) | 42.0% | |
0057 | Insert Interval | [Go]({{< relref "/ChapterFour/0001~0099/0057.Insert-Interval.md" >}}) | Medium | O(n) | O(1) | 35.8% | |
0075 | Sort Colors | [Go]({{< relref "/ChapterFour/0001~0099/0075.Sort-Colors.md" >}}) | Medium | O(n) | O(1) | ❤️ | 50.6% |
0147 | Insertion Sort List | [Go]({{< relref "/ChapterFour/0100~0199/0147.Insertion-Sort-List.md" >}}) | Medium | O(n^2) | O(1) | ❤️ | 45.2% |
0148 | Sort List | [Go]({{< relref "/ChapterFour/0100~0199/0148.Sort-List.md" >}}) | Medium | O(n log n) | O(log n) | ❤️ | 47.5% |
0164 | Maximum Gap | [Go]({{< relref "/ChapterFour/0100~0199/0164.Maximum-Gap.md" >}}) | Hard | O(n log n) | O(log n) | ❤️ | 39.7% |
0179 | Largest Number | [Go]({{< relref "/ChapterFour/0100~0199/0179.Largest-Number.md" >}}) | Medium | O(n log n) | O(log n) | ❤️ | 31.2% |
0220 | Contains Duplicate III | [Go]({{< relref "/ChapterFour/0200~0299/0220.Contains-Duplicate-III.md" >}}) | Medium | O(n log n) | O(1) | ❤️ | 21.4% |
0242 | Valid Anagram | [Go]({{< relref "/ChapterFour/0200~0299/0242.Valid-Anagram.md" >}}) | Easy | O(n) | O(n) | 59.3% | |
0274 | H-Index | [Go]({{< relref "/ChapterFour/0200~0299/0274.H-Index.md" >}}) | Medium | O(n) | O(n) | 36.6% | |
0315 | Count of Smaller Numbers After Self | [Go]({{< relref "/ChapterFour/0300~0399/0315.Count-of-Smaller-Numbers-After-Self.md" >}}) | Hard | 42.3% | |||
0324 | Wiggle Sort II | [Go]({{< relref "/ChapterFour/0300~0399/0324.Wiggle-Sort-II.md" >}}) | Medium | O(n) | O(n) | ❤️ | 31.0% |
0327 | Count of Range Sum | [Go]({{< relref "/ChapterFour/0300~0399/0327.Count-of-Range-Sum.md" >}}) | Hard | 36.3% | |||
0349 | Intersection of Two Arrays | [Go]({{< relref "/ChapterFour/0300~0399/0349.Intersection-of-Two-Arrays.md" >}}) | Easy | O(n) | O(n) | 66.1% | |
0350 | Intersection of Two Arrays II | [Go]({{< relref "/ChapterFour/0300~0399/0350.Intersection-of-Two-Arrays-II.md" >}}) | Easy | O(n) | O(n) | 52.5% | |
0493 | Reverse Pairs | [Go]({{< relref "/ChapterFour/0400~0499/0493.Reverse-Pairs.md" >}}) | Hard | 27.7% | |||
0524 | Longest Word in Dictionary through Deleting | [Go]({{< relref "/ChapterFour/0500~0599/0524.Longest-Word-in-Dictionary-through-Deleting.md" >}}) | Medium | O(n) | O(1) | 50.3% | |
0710 | Random Pick with Blacklist | [Go]({{< relref "/ChapterFour/0700~0799/0710.Random-Pick-with-Blacklist.md" >}}) | Hard | O(n) | O(n) | 33.2% | |
0767 | Reorganize String | [Go]({{< relref "/ChapterFour/0700~0799/0767.Reorganize-String.md" >}}) | Medium | O(n log n) | O(log n) | ❤️ | 50.6% |
0853 | Car Fleet | [Go]({{< relref "/ChapterFour/0800~0899/0853.Car-Fleet.md" >}}) | Medium | O(n log n) | O(log n) | 44.9% | |
0922 | Sort Array By Parity II | [Go]({{< relref "/ChapterFour/0900~0999/0922.Sort-Array-By-Parity-II.md" >}}) | Easy | O(n) | O(1) | 70.7% | |
0969 | Pancake Sorting | [Go]({{< relref "/ChapterFour/0900~0999/0969.Pancake-Sorting.md" >}}) | Medium | O(n log n) | O(log n) | ❤️ | 69.0% |
0973 | K Closest Points to Origin | [Go]({{< relref "/ChapterFour/0900~0999/0973.K-Closest-Points-to-Origin.md" >}}) | Medium | O(n log n) | O(log n) | 65.0% | |
0976 | Largest Perimeter Triangle | [Go]({{< relref "/ChapterFour/0900~0999/0976.Largest-Perimeter-Triangle.md" >}}) | Easy | O(n log n) | O(log n) | 59.4% | |
1030 | Matrix Cells in Distance Order | [Go]({{< relref "/ChapterFour/1000~1099/1030.Matrix-Cells-in-Distance-Order.md" >}}) | Easy | O(n^2) | O(1) | 68.5% | |
1054 | Distant Barcodes | [Go]({{< relref "/ChapterFour/1000~1099/1054.Distant-Barcodes.md" >}}) | Medium | O(n log n) | O(log n) | ❤️ | 44.6% |
1122 | Relative Sort Array | [Go]({{< relref "/ChapterFour/1100~1199/1122.Relative-Sort-Array.md" >}}) | Easy | 68.0% | |||
1235 | Maximum Profit in Job Scheduling | [Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}}) | Hard | 48.2% | |||
1305 | All Elements in Two Binary Search Trees | [Go]({{< relref "/ChapterFour/1300~1399/1305.All-Elements-in-Two-Binary-Search-Trees.md" >}}) | Medium | 77.9% | |||
1329 | Sort the Matrix Diagonally | [Go]({{< relref "/ChapterFour/1300~1399/1329.Sort-the-Matrix-Diagonally.md" >}}) | Medium | 81.4% | |||
1353 | Maximum Number of Events That Can Be Attended | [Go]({{< relref "/ChapterFour/1300~1399/1353.Maximum-Number-of-Events-That-Can-Be-Attended.md" >}}) | Medium | 30.6% | |||
1383 | Maximum Performance of a Team | [Go]({{< relref "/ChapterFour/1300~1399/1383.Maximum-Performance-of-a-Team.md" >}}) | Hard | 41.2% | |||
1636 | Sort Array by Increasing Frequency | [Go]({{< relref "/ChapterFour/1600~1699/1636.Sort-Array-by-Increasing-Frequency.md" >}}) | Easy | 67.2% | |||
1640 | Check Array Formation Through Concatenation | [Go]({{< relref "/ChapterFour/1600~1699/1640.Check-Array-Formation-Through-Concatenation.md" >}}) | Easy | 55.5% | |||
1647 | Minimum Deletions to Make Character Frequencies Unique | [Go]({{< relref "/ChapterFour/1600~1699/1647.Minimum-Deletions-to-Make-Character-Frequencies-Unique.md" >}}) | Medium | 55.7% | |||
1648 | Sell Diminishing-Valued Colored Balls | [Go]({{< relref "/ChapterFour/1600~1699/1648.Sell-Diminishing-Valued-Colored-Balls.md" >}}) | Medium | 31.1% | |||
1691 | Maximum Height by Stacking Cuboids | [Go]({{< relref "/ChapterFour/1600~1699/1691.Maximum-Height-by-Stacking-Cuboids.md" >}}) | Hard | 51.0% | |||
1710 | Maximum Units on a Truck | [Go]({{< relref "/ChapterFour/1700~1799/1710.Maximum-Units-on-a-Truck.md" >}}) | Easy | 72.5% | |||
------------ | ------------------------------------------------------- | ------- | ---------------- | --------------- | ------------- | ------------- | ------------- |