Skip to content

Commit 1c33bb4

Browse files
committed
add array
1 parent 4d30362 commit 1c33bb4

File tree

4 files changed

+169
-0
lines changed

4 files changed

+169
-0
lines changed

Array/array-leetcode-list.md

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
2+
>下面是总结的数组类题目:
3+
4+
#### K-SUM类题目
5+
| 序号 | 题目 | 难度 | 代码 |
6+
| ---- | ------------------------------------------------------------ | ------ | ----------------- |
7+
| 1 | [Two Sum ](https://leetcode.com/problems/two-sum) | easy | python、java、c++ |
8+
| 167 | [Two Sum II - Input array is sorted ](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted) | Easy | python、java、c++ |
9+
| 15 | [3Sum ](https://leetcode.com/problems/3sum) | Medium | python、java、c++ |
10+
| 16 | [3Sum Closest ](https://leetcode.com/problems/3sum-closest) | Medium | python、java、c++ |
11+
| 259 | [3Sum Smaller ](https://leetcode.com/problems/3sum-smaller) | Medium | python、java、c++ |
12+
| 18 | [4Sum ](https://leetcode.com/problems/4sum) | Medium | python、java、c++ |
13+
14+
15+
#### 区间问题
16+
| 序号 | 题目 | 难度 | 代码 |
17+
| ---- | ------------------------------------------------------------ | ------ | :---------------- |
18+
| 56 | [Merge Intervals ](https://leetcode.com/problems/merge-intervals) | Medium | python、java、c++ |
19+
| 57 | [Insert Interval ](https://leetcode.com/problems/insert-interval) | Hard | python、java、c++ |
20+
| 252 | [Meeting Rooms](https://leetcode.com/problems/meeting-rooms/) | easy | python、java、c++ |
21+
| 253 | [Meeting Rooms II](https://leetcode.com/problems/meeting-rooms-ii/) | medium | python、java、c++ |
22+
| 352 | [Data Stream as Disjoint Intervals](https://leetcode.com/problems/data-stream-as-disjoint-intervals/) | hard | python、java、c++ |
23+
24+
#### 子数组类题目
25+
| 序号 | 题目 | 难度 | 代码 |
26+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
27+
| 78 | [Subsets](https://leetcode.com/problems/subsets/) | medium | python、java、c++ |
28+
| 90 | [Subsets II](https://leetcode.com/problems/subsets-ii/) | medium | python、java、c++ |
29+
| 53 | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) | easy | python、java、c++ |
30+
| 152 | [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) | medium | python、java、c++ |
31+
| 239 | [Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/) | hard | python、java、c++ |
32+
| 295 | [Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream/) | hard | python、java、c++ |
33+
| 228 | [Summary Ranges](https://leetcode.com/problems/summary-ranges/) | medium | python、java、c++ |
34+
| 163 | [Missing Ranges](https://leetcode.com/problems/missing-ranges/) | medium | python、java、c++ |
35+
| 325 | [Maximum Size Subarray Sum Equals k](https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/) | medium | python、java、c++ |
36+
| 209 | [Minimum Size Subarray Sum](https://leetcode.com/problems/minimum-size-subarray-sum/) | medium | python、java、c++ |
37+
| 238 | [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/) | medium | python、java、c++ |
38+
| 128 | [Longest Consecutive Sequence ](https://leetcode.com/problems/longest-consecutive-sequence) | Hard | python、java、c++ |
39+
40+
#### Rotate类题目
41+
| 序号 | 题目 | 难度 | 代码 |
42+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
43+
| 48 | [Rotate Image ](https://leetcode.com/problems/rotate-image) | Medium | python、java、c++ |
44+
| 89 | [Search in Rotated Sorted Array ](https://leetcode.com/problems/search-in-rotated-sorted-array) | Medium | python、java、c++ |
45+
| 189 | [Rotate Array ](https://leetcode.com/problems/rotate-array) | Easy | python、java、c++ |
46+
| 81 | [Search in Rotated Sorted Array II ](https://leetcode.com/problems/search-in-rotated-sorted-array-ii) | Medium | python、java、c++ |
47+
48+
#### 数组排序
49+
| 序号 | 题目 | 难度 | 代码 |
50+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
51+
| 88 | [Merge Sorted Array ](https://leetcode.com/problems/merge-sorted-array) | Easy | python、java、c++ |
52+
| 75 | [Sort Colors ](https://leetcode.com/problems/sort-colors) | Medium | python、java、c++ |
53+
| 283 | [Move Zeroes ](https://leetcode.com/problems/move-zeroes) | Easy | python、java、c++ |
54+
| 376 | [Wiggle Subsequence](https://leetcode.com/problems/wiggle-subsequence/) | medium | python、java、c++ |
55+
| 280 | [Wiggle Sort](https://leetcode.com/problems/wiggle-sort/) | medium | python、java、c++ |
56+
| 324 | [Wiggle Sort II](https://leetcode.com/problems/wiggle-sort-ii/) | medium | python、java、c++ |
57+
| 215 | [Kth Largest Element in an Array ](https://leetcode.com/problems/kth-largest-element-in-an-array) | medium | python、java、c++ |
58+
| 287 | [Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number) | medium | python、java、c++ |
59+
| 334 | [Increasing Triplet Subsequence ](https://leetcode.com/problems/increasing-triplet-subsequence) | medium | python、java、c++ |
60+
| 400 | [Nth Digit ](https://leetcode.com/problems/nth-digit) | easy | python、java、c++ |
61+
| 387 | [First Unique Character in a String ](https://leetcode.com/problems/first-unique-character-in-a-string) | easy | python、java、c++ |
62+
| 164 | [Maximum Gap ](https://leetcode.com/problems/maximum-gap) | hard | python、java、c++ |
63+
| 347 | [Top K Frequent Elements ](https://leetcode.com/problems/top-k-frequent-elements) | medium | python、java、c++ |
64+
| 243 | [Shortest Word Distance](https://leetcode.com/problems/shortest-word-distance) | easy | python、java、c++ |
65+
| 244 | [Shortest Word Distance II ](https://leetcode.com/problems/shortest-word-distance-ii) | medium | python、java、c++ |
66+
| 245 | [Shortest Word Distance III](https://leetcode.com/problems/shortest-word-distance-iii) | medium | python、java、c++ |
67+
68+
#### 双指针问题
69+
| 序号 | 题目 | 难度 | 代码 |
70+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
71+
| 11 | [Container With Most Water ](https://leetcode.com/problems/container-with-most-water) | Medium | python、java、c++ |
72+
| 41 | [First Missing Positive ](https://leetcode.com/problems/first-missing-positive) | Hard | python、java、c++ |
73+
| 42 | [Trapping Rain Water ](https://leetcode.com/problems/trapping-rain-water) | Hard | python、java、c++ |
74+
| 84 | [Largest Rectangle in Histogram ](https://leetcode.com/problems/largest-rectangle-in-histogram) | Hard | python、java、c++ |
75+
| 85 | [Maximal Rectangle ](https://leetcode.com/problems/maximal-rectangle) | Hard | python、java、c++ |
76+
| 243 | [Shortest Word Distance ](https://leetcode.com/problems/shortest-word-distance) | Easy | python、java、c++ |
77+
| 244 | [Shortest Word Distance II](https://leetcode.com/problems/shortest-word-distance-ii) | medium | python、java、c++ |
78+
| 245 | [Shortest Word Distance III ](https://leetcode.com/problems/shortest-word-distance-iii) | Medium | python、java、c++ |
79+
80+
#### 二维数组
81+
| 序号 | 题目 | 难度 | 代码 |
82+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
83+
| 48 | [Rotate Image ](https://leetcode.com/problems/rotate-image) | Medium | python、java、c++ |
84+
| 54 | [Spiral Matrix ](https://leetcode.com/problems/spiral-matrix) | Medium | python、java、c++ |
85+
| 73 | [Set Matrix Zeroes ](https://leetcode.com/problems/set-matrix-zeroes) | Medium | python、java、c++ |
86+
| 311 | [Sparse Matrix Multiplication ](https://leetcode.com/problems/sparse-matrix-multiplication) | medium | python、java、c++ |
87+
| 36 | [Valid Sudoku ](https://leetcode.com/problems/valid-sudoku) | meidum | python、java、c++ |
88+
| 37 | [Sudoku Solver ](https://leetcode.com/problems/sudoku-solver) | hard | python、java、c++ |
89+
90+
#### 动态规划
91+
| 序号 | 题目 | 难度 | 代码 |
92+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
93+
| 62 | [Unique Paths ](https://leetcode.com/problems/unique-paths) | Medium | python、java、c++ |
94+
| 63 | [Unique Paths II ](https://leetcode.com/problems/unique-paths-ii) | Medium | python、java、c++ |
95+
| 64 | [Minimum Path Sum ](https://leetcode.com/problems/minimum-path-sum) | Medium | python、java、c++ |
96+
| 120 | [Triangle ](https://leetcode.com/problems/triangle) | Medium | python、java、c++ |
97+
98+
#### 二叉树
99+
| 序号 | 题目 | 难度 | 代码 |
100+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
101+
| 105 | [Construct Binary Tree from Preorder and Inorder Traversal ](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal) | Medium | python、java、c++ |
102+
| 106 | [Construct Binary Tree from Inorder and Postorder Traversal ](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal) | Medium | python、java、c++ |
103+
104+
105+
#### Math
106+
| 序号 | 题目 | 难度 | 代码 |
107+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
108+
| 66 | [Plus One ](https://leetcode.com/problems/plus-one) | Easy | python、java、c++ |
109+
| 118 | [Pascal's Triangle ](https://leetcode.com/problems/pascals-triangle) | Easy | python、java、c++ |
110+
| 119 | [Pascal's Triangle II ](https://leetcode.com/problems/pascals-triangle-ii) | Easy | python、java、c++ |
111+
112+
####基础
113+
##### 基础题目
114+
| 序号 | 题目 | 难度 | 代码 |
115+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
116+
| 217 | [Contains Duplicate ](https://leetcode.com/problems/contains-duplicate) | Easy | python、java、c++ |
117+
| 219 | [Contains Duplicate II ](https://leetcode.com/problems/contains-duplicate-ii) | Easy | python、java、c++ |
118+
| 380 | [Insert Delete GetRandom O(1) ](https://leetcode.com/problems/insert-delete-getrandom-o1) | Medium | python、java、c++ |
119+
| 381 | [Insert Delete GetRandom O(1) - Duplicates allowed ](https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed) | Hard | python、java、c++ |
120+
| 31 | [Next Permutation ](https://leetcode.com/problems/next-permutation) | Medium | |
121+
122+
##### Search类题
123+
| 序号 | 题目 | 难度 | 代码 |
124+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
125+
| 33 | [Search in Rotated Sorted Array ](https://leetcode.com/problems/wiggle-subsequence/) | Medium | 代码 |
126+
| 81 | [Search in Rotated Sorted Array II ](https://leetcode.com/problems/sort-colors) | Medium | |
127+
| 34 | [Find First and Last Position of Element in Sorted Array ](https://leetcode.com/problems/wiggle-sort/) | Medium | python、java、c++ |
128+
| 35 | [Search Insert Position ](https://leetcode.com/problems/next-permutation) | Easy | python、java、c++ |
129+
| 74 | [Search a 2D Matrix ](https://leetcode.com/problems/combination-sum) | Medium | python、java、c++ |
130+
| 79 | [Word Search ](https://leetcode.com/problems/combination-sum-ii) | Medium | python、java、c++ |
131+
| 153 | [Find Minimum in Rotated Sorted Array ](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array) | Medium | python、java、c++ |
132+
| 154 | [Find Minimum in Rotated Sorted Array II ](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii) | Hard | python、java、c++ |
133+
| 39 | [Combination Sum ](https://leetcode.com/problems/largest-rectangle-in-histogram) | Medium | python、java、c++ |
134+
| 40 | [Combination Sum II ](https://leetcode.com/problems/combination-sum-ii) | Medium | python、java、c++ |
135+
| 216 | [Combination Sum III ](https://leetcode.com/problems/combination-sum-iii) | Medium | python、java、c++ |
136+
| 45 | [Jump Game II ](https://leetcode.com/problems/jump-game-ii) | Hard | python、java、c++ |
137+
| 55 | [Jump Game ](https://leetcode.com/problems/jump-game) | Medium | python、java、c++ |
138+
| 121 | [Best Time to Buy and Sell Stock ](https://leetcode.com/problems/best-time-to-buy-and-sell-stock) | Easy | python、java、c++ |
139+
| 122 | [Best Time to Buy and Sell Stock II ](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii) | Easy | python、java、c++ |
140+
| 123 | [Best Time to Buy and Sell Stock III ](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii) | Hard | python、java、c++ |
141+
| 126 | [Word Ladder II ](https://leetcode.com/problems/word-ladder-ii) | Hard | python、java、c++ |
142+
| 162 | [Find Peak Element ](https://leetcode.com/problems/find-peak-element) | Medium | python、java、c++ |
143+
| 169 | [Majority Element ](https://leetcode.com/problems/majority-element) | Easy | python、java、c++ |
144+
| 229 | [Majority Element II ](https://leetcode.com/problems/majority-element-ii) | Medium | python、java、c++ |
145+
146+
##### Remove类题目
147+
| 序号 | 题目 | 难度 | 代码 |
148+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
149+
| 26 | [Remove Duplicates from Sorted Array ](https://leetcode.com/problems/remove-duplicates-from-sorted-array) | Easy | python、java、c++ |
150+
| 27 | [Remove Element ](https://leetcode.com/problems/remove-element) | Easy | python、java、c++ |
151+
| 80 | [Remove Duplicates from Sorted Array II ](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii) | Medium | python、java、c++ |
152+
153+
#### 提高题目
154+
| 序号 | 题目 | 难度 | 代码 |
155+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
156+
| 4 | [Median of Two Sorted Arrays ](https://leetcode.com/problems/median-of-two-sorted-arrays) | Hard | python、java、c++ |
157+
| 289 | [Game of Life ](https://leetcode.com/problems/game-of-life) | Medium | python、java、c++ |
158+
159+
#### 综合题
160+
| 序号 | 题目 | 难度 | 代码 |
161+
| ------------ | ------------------------------------------------------------ | ------ | ----------------- |
162+
| 274 | [H-Index](https://leetcode.com/problems/h-index/) | medium | python、java、c++ |
163+
| 376 | [Wiggle Subsequence](https://leetcode.com/problems/wiggle-subsequence) | medium | python、java、c++ |
164+
| 277 | [Find the Celebrity ](https://leetcode.com/problems/game-of-life) | medium | python、java、c++ |
165+
| 370 | [Range Addition ](https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed) | medium | python、java、c++ |
166+
| 296 | [Best Meeting Point](https://leetcode.com/problems/best-meeting-point) | hard | python、java、c++ |

Array/interval/1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
##
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
##

Array/subsets/78-Subsets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
##

0 commit comments

Comments
 (0)