2.14 ✅ Sorting

Sorting #

  • 深刻的理解多路快排。第 75 题。
  • 链表的排序,插入排序(第 147 题)和归并排序(第 148 题)
  • 桶排序和基数排序。第 164 题。
  • “摆动排序”。第 324 题。
  • 两两不相邻的排序。第 767 题,第 1054 题。
  • “饼子排序”。第 969 题。
No.TitleSolutionDifficultyTimeComplexitySpaceComplexityFavoriteAcceptance
00153SumGoMedium31.3%
00163Sum ClosestGoMedium47.1%
00184SumGoMedium37.4%
0049Group AnagramsGoMedium64.5%
0056Merge IntervalsGoMediumO(n log n)O(log n)45.1%
0075Sort ColorsGoMediumO(n)O(1)❤️55.2%
0088Merge Sorted ArrayGoEasy44.1%
0147Insertion Sort ListGoMediumO(n^2)O(1)❤️49.1%
0148Sort ListGoMediumO(n log n)O(log n)❤️52.4%
0164Maximum GapGoHardO(n log n)O(log n)❤️41.6%
0169Majority ElementGoEasy63.1%
0179Largest NumberGoMediumO(n log n)O(log n)❤️33.1%
0215Kth Largest Element in an ArrayGoMedium63.8%
0217Contains DuplicateGoEasy61.0%
0220Contains Duplicate IIIGoMediumO(n log n)O(1)❤️21.7%
0229Majority Element IIGoMedium42.7%
0242Valid AnagramGoEasyO(n)O(n)61.6%
0268Missing NumberGoEasy60.5%
0274H-IndexGoMediumO(n)O(n)37.7%
0324Wiggle Sort IIGoMediumO(n)O(n)❤️32.3%
0347Top K Frequent ElementsGoMedium65.0%
0349Intersection of Two ArraysGoEasyO(n)O(n)69.3%
0350Intersection of Two Arrays IIGoEasyO(n)O(n)55.1%
0354Russian Doll EnvelopesGoHard38.9%
0368Largest Divisible SubsetGoMedium40.7%
0378Kth Smallest Element in a Sorted MatrixGoMedium59.8%
0389Find the DifferenceGoEasy60.5%
0414Third Maximum NumberGoEasy31.9%
0435Non-overlapping IntervalsGoMedium48.5%
0436Find Right IntervalGoMedium49.8%
0451Sort Characters By FrequencyGoMedium67.9%
0455Assign CookiesGoEasy50.7%
0462Minimum Moves to Equal Array Elements IIGoMedium57.2%
0475HeatersGoMedium35.5%
0506Relative RanksGoEasy57.1%
0524Longest Word in Dictionary through DeletingGoMediumO(n)O(1)50.9%
0532K-diff Pairs in an ArrayGoMedium40.3%
0561Array Partition IGoEasy75.8%
0581Shortest Unsorted Continuous SubarrayGoMedium36.0%
0594Longest Harmonious SubsequenceGoEasy52.8%
0611Valid Triangle NumberGoMedium49.8%
0628Maximum Product of Three NumbersGoEasy46.7%
0632Smallest Range Covering Elements from K ListsGoHard58.8%
0645Set MismatchGoEasy41.3%
0658Find K Closest ElementsGoMedium44.6%
0692Top K Frequent WordsGoMedium54.5%
0710Random Pick with BlacklistGoHardO(n)O(n)33.3%
0719Find K-th Smallest Pair DistanceGoHard35.3%
0720Longest Word in DictionaryGoMedium51.1%
0726Number of AtomsGoHard51.8%
0747Largest Number At Least Twice of OthersGoEasy45.4%
0767Reorganize StringGoMediumO(n log n)O(log n)❤️52.2%
0791Custom Sort StringGoMedium69.2%
0792Number of Matching SubsequencesGoMedium50.6%
0825Friends Of Appropriate AgesGoMedium46.1%
0826Most Profit Assigning WorkGoMedium42.5%
0846Hand of StraightsGoMedium56.3%
0853Car FleetGoMediumO(n log n)O(log n)48.5%
0869Reordered Power of 2GoMedium61.2%
0870Advantage ShuffleGoMedium51.3%
0881Boats to Save PeopleGoMedium52.5%
0888Fair Candy SwapGoEasy60.4%
0891Sum of Subsequence WidthsGoHard35.8%
0910Smallest Range IIGoMedium32.9%
0922Sort Array By Parity IIGoEasyO(n)O(1)70.7%
09233Sum With MultiplicityGoMedium45.4%
0969Pancake SortingGoMediumO(n log n)O(log n)❤️69.8%
0973K Closest Points to OriginGoMediumO(n log n)O(log n)65.9%
0976Largest Perimeter TriangleGoEasyO(n log n)O(log n)54.7%
0977Squares of a Sorted ArrayGoEasy71.7%
1005Maximize Sum Of Array After K NegationsGoEasy51.4%
1030Matrix Cells in Distance OrderGoEasyO(n^2)O(1)69.2%
1040Moving Stones Until Consecutive IIGoMedium55.6%
1051Height CheckerGoEasy74.4%
1054Distant BarcodesGoMediumO(n log n)O(log n)❤️45.2%
1122Relative Sort ArrayGoEasy68.2%
1170Compare Strings by Frequency of the Smallest CharacterGoMedium61.1%
1200Minimum Absolute DifferenceGoEasy69.8%
1235Maximum Profit in Job SchedulingGoHard50.9%
1296Divide Array in Sets of K Consecutive NumbersGoMedium56.5%
1300Sum of Mutated Array Closest to TargetGoMedium42.9%
1305All Elements in Two Binary Search TreesGoMedium79.6%
1329Sort the Matrix DiagonallyGoMedium81.4%
1337The K Weakest Rows in a MatrixGoEasy74.1%
1383Maximum Performance of a TeamGoHard41.5%
1385Find the Distance Value Between Two ArraysGoEasy65.6%
1464Maximum Product of Two Elements in an ArrayGoEasy78.6%
1465Maximum Area of a Piece of Cake After Horizontal and Vertical CutsGoMedium37.2%
1608Special Array With X Elements Greater Than or Equal XGoEasy60.4%
1619Mean of Array After Removing Some ElementsGoEasy64.5%
1636Sort Array by Increasing FrequencyGoEasy68.4%
1647Minimum Deletions to Make Character Frequencies UniqueGoMedium56.4%
1648Sell Diminishing-Valued Colored BallsGoMedium30.9%
1657Determine if Two Strings Are CloseGoMedium54.5%
1665Minimum Initial Energy to Finish TasksGoHard55.8%
1679Max Number of K-Sum PairsGoMedium57.6%
1691Maximum Height by Stacking CuboidsGoHard54.0%
1710Maximum Units on a TruckGoEasy72.1%
1818Minimum Absolute Sum DifferenceGoMedium29.5%
1846Maximum Element After Decreasing and RearrangingGoMedium58.2%
1877Minimize Maximum Pair Sum in ArrayGoMedium80.7%
1984Minimum Difference Between Highest and Lowest of K ScoresGoEasy53.4%
2037Minimum Number of Moves to Seat EveryoneGoEasy82.7%
2164Sort Even and Odd Indices IndependentlyGoEasy67.2%
2165Smallest Value of the Rearranged NumberGoMedium50.8%
2171Removing Minimum Number of Magic BeansGoMedium41.2%
——————————————————————-——-—————-—————————-————-————-

⬅️上一页

下一页➡️

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