2.14 ✅ Sorting

Sorting #

  • 深刻的理解多路快排。第 75 题。
  • 链表的排序,插入排序(第 147 题)和归并排序(第 148 题)
  • 桶排序和基数排序。第 164 题。
  • “摆动排序”。第 324 题。
  • 两两不相邻的排序。第 767 题,第 1054 题。
  • “饼子排序”。第 969 题。
No.TitleSolutionDifficultyTimeComplexitySpaceComplexityFavoriteAcceptance
00153SumGoMedium30.2%
00163Sum ClosestGoMedium46.9%
00184SumGoMedium36.8%
0049Group AnagramsGoMedium62.8%
0056Merge IntervalsGoMediumO(n log n)O(log n)43.6%
0075Sort ColorsGoMediumO(n)O(1)❤️53.3%
0088Merge Sorted ArrayGoEasy42.6%
0147Insertion Sort ListGoMediumO(n^2)O(1)❤️48.0%
0148Sort ListGoMediumO(n log n)O(log n)❤️49.4%
0164Maximum GapGoHardO(n log n)O(log n)❤️40.7%
0169Majority ElementGoEasy61.7%
0179Largest NumberGoMediumO(n log n)O(log n)❤️32.2%
0215Kth Largest Element in an ArrayGoMedium61.9%
0217Contains DuplicateGoEasy59.5%
0220Contains Duplicate IIIGoMediumO(n log n)O(1)❤️21.6%
0229Majority Element IIGoMedium41.1%
0242Valid AnagramGoEasyO(n)O(n)60.5%
0268Missing NumberGoEasy58.1%
0274H-IndexGoMediumO(n)O(n)37.1%
0324Wiggle Sort IIGoMediumO(n)O(n)❤️31.7%
0347Top K Frequent ElementsGoMedium64.0%
0349Intersection of Two ArraysGoEasyO(n)O(n)67.8%
0350Intersection of Two Arrays IIGoEasyO(n)O(n)54.1%
0354Russian Doll EnvelopesGoHard39.4%
0368Largest Divisible SubsetGoMedium40.2%
0378Kth Smallest Element in a Sorted MatrixGoMedium58.8%
0389Find the DifferenceGoEasy59.0%
0414Third Maximum NumberGoEasy31.2%
0435Non-overlapping IntervalsGoMedium46.8%
0436Find Right IntervalGoMedium49.1%
0451Sort Characters By FrequencyGoMedium67.0%
0455Assign CookiesGoEasy50.6%
0462Minimum Moves to Equal Array Elements IIGoMedium56.3%
0475HeatersGoMedium34.7%
0506Relative RanksGoEasy54.9%
0524Longest Word in Dictionary through DeletingGoMediumO(n)O(1)50.8%
0532K-diff Pairs in an ArrayGoMedium37.2%
0561Array Partition IGoEasy74.9%
0581Shortest Unsorted Continuous SubarrayGoMedium33.7%
0594Longest Harmonious SubsequenceGoEasy52.3%
0611Valid Triangle NumberGoMedium49.4%
0628Maximum Product of Three NumbersGoEasy46.7%
0632Smallest Range Covering Elements from K ListsGoHard57.2%
0645Set MismatchGoEasy41.1%
0658Find K Closest ElementsGoMedium43.9%
0692Top K Frequent WordsGoMedium54.0%
0710Random Pick with BlacklistGoHardO(n)O(n)33.1%
0719Find K-th Smallest Pair DistanceGoHard34.1%
0720Longest Word in DictionaryGoMedium50.4%
0767Reorganize StringGoMediumO(n log n)O(log n)❤️51.4%
0791Custom Sort StringGoMedium68.0%
0792Number of Matching SubsequencesGoMedium50.2%
0826Most Profit Assigning WorkGoMedium40.6%
0853Car FleetGoMediumO(n log n)O(log n)47.2%
0869Reordered Power of 2GoMedium61.3%
0870Advantage ShuffleGoMedium51.0%
0881Boats to Save PeopleGoMedium49.6%
0888Fair Candy SwapGoEasy60.1%
0891Sum of Subsequence WidthsGoHard34.2%
0910Smallest Range IIGoMedium32.0%
0922Sort Array By Parity IIGoEasyO(n)O(1)70.5%
09233Sum With MultiplicityGoMedium41.3%
0969Pancake SortingGoMediumO(n log n)O(log n)❤️69.4%
0973K Closest Points to OriginGoMediumO(n log n)O(log n)65.8%
0976Largest Perimeter TriangleGoEasyO(n log n)O(log n)60.0%
0977Squares of a Sorted ArrayGoEasy71.4%
1005Maximize Sum Of Array After K NegationsGoEasy51.8%
1030Matrix Cells in Distance OrderGoEasyO(n^2)O(1)68.8%
1040Moving Stones Until Consecutive IIGoMedium55.1%
1051Height CheckerGoEasy73.8%
1054Distant BarcodesGoMediumO(n log n)O(log n)❤️45.0%
1122Relative Sort ArrayGoEasy68.0%
1170Compare Strings by Frequency of the Smallest CharacterGoMedium60.8%
1200Minimum Absolute DifferenceGoEasy69.6%
1235Maximum Profit in Job SchedulingGoHard50.6%
1300Sum of Mutated Array Closest to TargetGoMedium42.4%
1305All Elements in Two Binary Search TreesGoMedium78.6%
1329Sort the Matrix DiagonallyGoMedium81.5%
1337The K Weakest Rows in a MatrixGoEasy72.2%
1383Maximum Performance of a TeamGoHard41.3%
1385Find the Distance Value Between Two ArraysGoEasy66.1%
1464Maximum Product of Two Elements in an ArrayGoEasy77.7%
1465Maximum Area of a Piece of Cake After Horizontal and Vertical CutsGoMedium37.0%
1608Special Array With X Elements Greater Than or Equal XGoEasy61.0%
1619Mean of Array After Removing Some ElementsGoEasy64.5%
1636Sort Array by Increasing FrequencyGoEasy67.9%
1647Minimum Deletions to Make Character Frequencies UniqueGoMedium55.9%
1648Sell Diminishing-Valued Colored BallsGoMedium31.7%
1657Determine if Two Strings Are CloseGoMedium54.7%
1665Minimum Initial Energy to Finish TasksGoHard55.4%
1679Max Number of K-Sum PairsGoMedium53.5%
1691Maximum Height by Stacking CuboidsGoHard52.6%
1710Maximum Units on a TruckGoEasy72.1%
1818Minimum Absolute Sum DifferenceGoMedium28.4%
1846Maximum Element After Decreasing and RearrangingGoMedium56.3%
1877Minimize Maximum Pair Sum in ArrayGoMedium80.2%
——————————————————————-——-—————-—————————-————-————-

⬅️上一页

下一页➡️

Calendar Jan 10, 2022
Edit Edit this page
本站总访问量:  次 您是本站第  位访问者