LeetCode
LeetCode copied to clipboard
Algorithm (算法)
Quick Select
- https://leetcode.com/problems/top-k-frequent-elements/editorial/
Quickselect (Hoare's selection algorithm)
- 215. Kth Largest Element in an Array [讲解不错,算法实现简单易明白]
- 347. Top K Frequent Elements
Sorting
- 88. Merge Sorted Array
- :white_check_mark: 56. Merge Intervals
- 252. Meeting Rooms [Arrays.sort(), no overlop]
- :white_check_mark: 253. Meeting Rooms II
- 2402. Meeting Rooms III [Sorting, PriorityQueue]
- 986. Interval List Intersections [Merge overlap]
- 1. Two Sum
- 167. Two Sum II - Input Array Is Sorted [Two pointers]
- 170. Two Sum III - Data structure design [未做]
- 653. Two Sum IV - Input is a BST [Two Sum II + Tree]
- 1099. Two Sum Less Than K [Sort, Two Sum II, Two Pointers]
- :white_check_mark: 15. 3Sum
- 1. Two Sum
- 16. 3Sum Closest [Two pointers; Binary Search]
- 259. 3Sum Smaller [Two pointers; Binary Search]
- :white_check_mark: 18. 4Sum [Two pointers, recursion]
- 49. Group Anagrams
- :white_check_mark: 1235. Maximum Profit in Job Scheduling [DP + Binary Search, Binary Search是重点]
- :white_check_mark: 2008. Maximum Earnings From Taxi [DP; PriorityQueue]
- 2054. Two Best Non-Overlapping Events [PriorityQueue; Binary Search]
- :white_check_mark: 2516. Take K of Each Character From Left and Right [Sliding Window]
Sliding window 和 Two pointers意义很相近。根据个人习惯,可以将长度不固定的叫two pointers,长度固定的叫sliding window