mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2026-03-13 10:02:05 +08:00
6.3 KiB
6.3 KiB
title, type
| title | type |
|---|---|
| Array | docs |
Array
| Title | Solution | Difficulty | Time | Space | 收藏 |
|---|---|---|---|---|---|
| 1. Two Sum | [Go]({{< relref "/ChapterFour/0001.Two-Sum.md" >}}) | Easy | O(n) | O(n) | |
| 11. Container With Most Water | [Go]({{< relref "/ChapterFour/0011.Container-With-Most-Water.md" >}}) | Medium | O(n) | O(1) | |
| 15. 3Sum | [Go]({{< relref "/ChapterFour/0015.3Sum.md" >}}) | Medium | O(n^2) | O(n) | ❤️ |
| 16. 3Sum Closest | [Go]({{< relref "/ChapterFour/0016.3Sum-Closest.md" >}}) | Medium | O(n^2) | O(1) | ❤️ |
| 18. 4Sum | [Go]({{< relref "/ChapterFour/0018.4Sum.md" >}}) | Medium | O(n^3) | O(n^2) | ❤️ |
| 26. Remove Duplicates from Sorted Array | [Go]({{< relref "/ChapterFour/0026.Remove-Duplicates-from-Sorted-Array.md" >}}) | Easy | O(n) | O(1) | |
| 27. Remove Element | [Go]({{< relref "/ChapterFour/0027.Remove-Element.md" >}}) | Easy | O(n) | O(1) | |
| 39. Combination Sum | [Go]({{< relref "/ChapterFour/0039.Combination-Sum.md" >}}) | Medium | O(n log n) | O(n) | |
| 40. Combination Sum II | [Go]({{< relref "/ChapterFour/0040.Combination-Sum-II.md" >}}) | Medium | O(n log n) | O(n) | |
| 41. First Missing Positive | [Go]({{< relref "/ChapterFour/0041.First-Missing-Positive.md" >}}) | Hard | O(n) | O(n) | |
| 42. Trapping Rain Water | [Go]({{< relref "/ChapterFour/0042.Trapping-Rain-Water.md" >}}) | Hard | O(n) | O(1) | ❤️ |
| 48. Rotate Image | [Go]({{< relref "/ChapterFour/0048.Rotate-Image.md" >}}) | Medium | O(n) | O(1) | |
| 53. Maximum Subarray | [Go]({{< relref "/ChapterFour/0053.Maximum-Subarray.md" >}}) | Easy | O(n) | O(n) | |
| 54. Spiral Matrix | [Go]({{< relref "/ChapterFour/0054.Spiral-Matrix.md" >}}) | Medium | O(n) | O(n^2) | |
| 56. Merge Intervals | [Go]({{< relref "/ChapterFour/0056.Merge-Intervals.md" >}}) | Medium | O(n log n) | O(1) | |
| 57. Insert Interval | [Go]({{< relref "/ChapterFour/0057.Insert-Interval.md" >}}) | Hard | O(n) | O(1) | |
| 59. Spiral Matrix II | [Go]({{< relref "/ChapterFour/0059.Spiral-Matrix-II.md" >}}) | Medium | O(n) | O(n^2) | |
| 62. Unique Paths | [Go]({{< relref "/ChapterFour/0062.Unique-Paths.md" >}}) | Medium | O(n^2) | O(n^2) | |
| 63. Unique Paths II | [Go]({{< relref "/ChapterFour/0063.Unique-Paths-II.md" >}}) | Medium | O(n^2) | O(n^2) | |
| 64. Minimum Path Sum | [Go]({{< relref "/ChapterFour/0064.Minimum-Path-Sum.md" >}}) | Medium | O(n^2) | O(n^2) | |
| 75. Sort Colors | [Go]({{< relref "/ChapterFour/0075.Sort-Colors.md" >}}) | Medium | O(n) | O(1) | ❤️ |
| 78. Subsets | [Go]({{< relref "/ChapterFour/0078.Subsets.md" >}}) | Medium | O(n^2) | O(n) | ❤️ |
| 79. Word Search | [Go]({{< relref "/ChapterFour/0079.Word-Search.md" >}}) | Medium | O(n^2) | O(n^2) | ❤️ |
| 80. Remove Duplicates from Sorted Array II | [Go]({{< relref "/ChapterFour/0080.Remove-Duplicates-from-Sorted-Array-II.md" >}}) | Medium | O(n) | O(1 | |
| 84. Largest Rectangle in Histogram | [Go]({{< relref "/ChapterFour/0084.Largest-Rectangle-in-Histogram.md" >}}) | Medium | O(n) | O(n) | ❤️ |
| 88. Merge Sorted Array | [Go]({{< relref "/ChapterFour/0088.Merge-Sorted-Array.md" >}}) | Easy | O(n) | O(1) | ❤️ |
| 90. Subsets II | [Go]({{< relref "/ChapterFour/0090.Subsets-II.md" >}}) | Medium | O(n^2) | O(n) | ❤️ |
| 120. Triangle | [Go]({{< relref "/ChapterFour/0120.Triangle.md" >}}) | Medium | O(n^2) | O(n) | |
| 121. Best Time to Buy and Sell Stock | [Go]({{< relref "/ChapterFour/0121.Best-Time-to-Buy-and-Sell-Stock.md" >}}) | Easy | O(n) | O(1) | |
| 122. Best Time to Buy and Sell Stock II | [Go]({{< relref "/ChapterFour/0122.Best-Time-to-Buy-and-Sell-Stock-II.md" >}}) | Easy | O(n) | O(1) | |
| 126. Word Ladder II | [Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}}) | Hard | O(n) | O(n^2) | ❤️ |
| 152. Maximum Product Subarray | [Go]({{< relref "/ChapterFour/0152.Maximum-Product-Subarray.md" >}}) | Medium | O(n) | O(1) | |
| 167. Two Sum II - Input array is sorted | [Go]({{< relref "/ChapterFour/0167.Two-Sum-II---Input-array-is-sorted.md" >}}) | Easy | O(n) | O(1) | |
| 209. Minimum Size Subarray Sum | [Go]({{< relref "/ChapterFour/0209.Minimum-Size-Subarray-Sum.md" >}}) | Medium | O(n) | O(1) | |
| 216. Combination Sum III | [Go]({{< relref "/ChapterFour/0216.Combination-Sum-III.md" >}}) | Medium | O(n) | O(1) | ❤️ |
| 217. Contains Duplicate | [Go]({{< relref "/ChapterFour/0217.Contains-Duplicate.md" >}}) | Easy | O(n) | O(n) | |
| 219. Contains Duplicate II | [Go]({{< relref "/ChapterFour/0219.Contains-Duplicate-II.md" >}}) | Easy | O(n) | O(n) | |
| 283. Move Zeroes | [Go]({{< relref "/ChapterFour/0283.Move-Zeroes.md" >}}) | Easy | O(n) | O(1) | |
| 287. Find the Duplicate Number | [Go]({{< relref "/ChapterFour/0287.Find-the-Duplicate-Number.md" >}}) | Easy | O(n) | O(1) | ❤️ |
| 532. K-diff Pairs in an Array | [Go]({{< relref "/ChapterFour/0532.K-diff-Pairs-in-an-Array.md" >}}) | Easy | O(n) | O(n) | |
| 566. Reshape the Matrix | [Go]({{< relref "/ChapterFour/0566.Reshape-the-Matrix.md" >}}) | Easy | O(n^2) | O(n^2) | |
| 628. Maximum Product of Three Numbers | [Go]({{< relref "/ChapterFour/0628.Maximum-Product-of-Three-Numbers.md" >}}) | Easy | O(n) | O(1) | |
| 713. Subarray Product Less Than K | [Go]({{< relref "/ChapterFour/0713.Subarray-Product-Less-Than-K.md" >}}) | Medium | O(n) | O(1) | |
| 714. Best Time to Buy and Sell Stock with Transaction Fee | [Go]({{< relref "/ChapterFour/0714.Best-Time-to-Buy-and-Sell-Stock-with-Transaction-Fee.md" >}}) | Medium | O(n) | O(1) | |
| 746. Min Cost Climbing Stairs | [Go]({{< relref "/ChapterFour/0746.Min-Cost-Climbing-Stairs.md" >}}) | Easy | O(n) | O(1) | |
| 766. Toeplitz Matrix | [Go]({{< relref "/ChapterFour/0766.Toeplitz-Matrix.md" >}}) | Easy | O(n) | O(1) | |
| 867. Transpose Matrix | [Go]({{< relref "/ChapterFour/0867.Transpose-Matrix.md" >}}) | Easy | O(n) | O(1) | |
| 891. Sum of Subsequence Widths | [Go]({{< relref "/ChapterFour/0891.Sum-of-Subsequence-Widths.md" >}}) | Hard | O(n log n) | O(1) | |
| 907. Sum of Subarray Minimums | [Go]({{< relref "/ChapterFour/0907.Sum-of-Subarray-Minimums.md" >}}) | Medium | O(n) | O(n) | ❤️ |
| 922. Sort Array By Parity II | [Go]({{< relref "/ChapterFour/0922.Sort-Array-By-Parity-II.md" >}}) | Medium | O(n) | O(1) | |
| 969. Pancake Sorting | [Go]({{< relref "/ChapterFour/0969.Pancake-Sorting.md" >}}) | Medium | O(n) | O(1) | ❤️ |
| 977. Squares of a Sorted Array | [Go]({{< relref "/ChapterFour/0977.Squares-of-a-Sorted-Array.md" >}}) | Easy | O(n) | O(1) | |
| --------------------------------------- | --------------------------------- | -------------------------- | ----------------------- | ----------- | -------- |