📝
notes
  • Initial page
  • 02_ds_algo
    • ds
      • Union Find
      • Binary Indexed Tree
      • Stack
      • String
      • Linked List
      • Segment Tree
      • Union Find
      • Union Find
      • Array
      • Tree
      • Hash Table
      • queue
    • algo
      • Backtracking
      • Sort
      • Binary Search
      • Depth First Search
      • Bit Manipulation
      • Dynamic Programming
      • Breadth First Search
      • Two Pointers
      • Math
      • Sliding Window
    • leetcode
      • List
      • 1. Two Sum
      • READEME
      • 2. Add Two Numbers
  • README
    • README
      • pointer
      • effective-cpp
      • roadmap
      • pimpl
      • smartptr
  • 03_cheatsheet
    • README
      • git
      • gdb
    • README
      • bash
      • Python 速查表中文版
    • README
      • vim
Powered by GitBook
On this page

Was this helpful?

  1. 02_ds_algo
  2. algo

Sort

  • 深刻的理解多路快排。第 75 题。

  • 链表的排序,插入排序(第 147 题)和归并排序(第 148 题)

  • 桶排序和基数排序。第 164 题。

  • "摆动排序"。第 324 题。

  • 两两不相邻的排序。第 767 题,第 1054 题。

  • "饼子排序"。第 969 题。

No.

Title

Solution

Difficulty

TimeComplexity

SpaceComplexity

Favorite

Acceptance

0056

Merge Intervals

Medium

O(n log n)

O(log n)

40.7%

0057

Insert Interval

Medium

O(n)

O(1)

34.9%

0075

Sort Colors

Medium

O(n)

O(1)

❤️

49.0%

0147

Insertion Sort List

Medium

O(n)

O(1)

❤️

44.2%

0148

Sort List

Medium

O(n log n)

O(log n)

❤️

45.9%

0164

Maximum Gap

Hard

O(n log n)

O(log n)

❤️

36.6%

0179

Largest Number

Medium

O(n log n)

O(log n)

❤️

30.5%

0220

Contains Duplicate III

Medium

O(n log n)

O(1)

❤️

21.3%

0242

Valid Anagram

Easy

O(n)

O(n)

58.0%

0274

H-Index

Medium

O(n)

O(n)

36.3%

0315

Count of Smaller Numbers After Self

Hard

42.6%

0324

Wiggle Sort II

Medium

O(n)

O(n)

❤️

30.6%

0327

Count of Range Sum

Hard

35.9%

0349

Intersection of Two Arrays

Easy

O(n)

O(n)

64.5%

0350

Intersection of Two Arrays II

Easy

O(n)

O(n)

51.9%

0493

Reverse Pairs

Hard

26.6%

0524

Longest Word in Dictionary through Deleting

Medium

O(n)

O(1)

48.9%

0710

Random Pick with Blacklist

Hard

O(n)

O(n)

32.6%

0767

Reorganize String

Medium

O(n log n)

O(log n)

❤️

49.9%

0853

Car Fleet

Medium

O(n log n)

O(log n)

43.6%

0922

Sort Array By Parity II

Easy

O(n)

O(1)

70.4%

0969

Pancake Sorting

Medium

O(n log n)

O(log n)

❤️

68.6%

0973

K Closest Points to Origin

Medium

O(n log n)

O(log n)

64.5%

0976

Largest Perimeter Triangle

Easy

O(n log n)

O(log n)

58.5%

1030

Matrix Cells in Distance Order

Easy

O(n^2)

O(1)

66.9%

1054

Distant Barcodes

Medium

O(n log n)

O(log n)

❤️

44.2%

1122

Relative Sort Array

Easy

67.9%

1235

Maximum Profit in Job Scheduling

Hard

47.0%

1305

All Elements in Two Binary Search Trees

Medium

77.8%

1329

Sort the Matrix Diagonally

Medium

81.8%

1640

Check Array Formation Through Concatenation

Easy

60.7%

1647

Minimum Deletions to Make Character Frequencies Unique

Medium

53.9%

1648

Sell Diminishing-Valued Colored Balls

Medium

30.9%

------------

-------------------------------------------------------

-------

----------------

---------------

-------------

-------------

-------------

PreviousBacktrackingNextBinary Search

Last updated 4 years ago

Was this helpful?