我的LeetCode刷题、思路和代码总结, 以Top 100 liked & Top interviewed questions 为主(since 2020, 更新中).
部分题目待更新,题解将逐步完善.
- Array
- Two Pointers
- DP
- Tree
- Linked List
- Subset
- DFS
- BFS
- Binary Search
- Graph
- Sliding Window
- Merge Intervals
- BackTracking
- Stack
- Bit Manipulation
- Heap
- Design
- Pair with Target Sum (模板)
- Remove Duplicates (模板)
- Triplet Sum to Zero (模板)
- Subarrays with Product Less than a Target (medium)
- Dutch National Flag Problem (medium) / 三色旗 / 颜色分类
- 4Sum
- 198. House Robber
- 337. House Robber III
- 256. Paint House
- 265. Paint House 2 (Hard)
- 221. Maximal Square (Medium)
- 494. Target Sum (Medium)
- 746. Min Cost Climbing Stairs
- 279. Perfect Squares
- 63. Unique Paths
- 322. Coin Change
- 518. Coin Change 2
- 486. Predict the Winner
- 377. Combination Sum IV
- 19. Remove Nth Node From End of List
- 24. Swap Nodes in Pair
- 141. Linked List Cycle
- 160. Intersection of Two Linked Lists
- 109. Convert Sorted List to BST
- 206. Reverse Linked List (经典 每日一题)
- 25. Reverse Node in k-Group (经典 Hard)
- 92. Reverse Linked List II (经典)
- 79. Word Search
- 130. Surrounded Regions
- 200. Numbers of Islands (三种方法, 经典)
- 695. Max Area of Island
- 547. Friend Circles
- 733. Flood Fill (经典)
- 162. Find Peak Element
- 4. Median of Two Sorted Arrays (Hard)
- 33. Search in Rotated Sorted Array
- 34. Find First and Last Position of Element in Sorted Array
- 153. Find Minimum in Rotated Sorted Array
- 209. Minimum Size Subarray Sum
- 230. Kth Smallest Element in a BST
- 240. Search a 2D Matrix II
- 270. Closest Binary Search Tree Value
- 287. Find the Duplicate Number
- 300. Longest Increasing Subsequence
- 315. Count of Smaller Numbers After Self
- 374. Guess Number Higher or Lower
- 875. Koko Eating Bananas
- 1337. The K Weakest Rows in a Matrix
- 1351. Count Negative Numbers in a Sorted Matrix
- 模板题: Merge Intervals
- 模板题: Insert Interval
- Intervals Intersection
- Conflicting Appointments
- Minimum Meeting Rooms
- Maximum CPU Load
- Employee Free Time (Hard)