【leetcode】高频题目整理_数组篇( High Frequency Problems, Array )

截止至今LeetCode题目总量已经有1582题,估计将来每年平均增长300题左右,大部分人肯定是刷不完的,所以得有选择地刷LeetCode。

一种公认的刷题策略是按类别刷题,可是每个类别也有许多题,在有限的时间里到底该刷哪些题呢?个人根据LeetCode官方给出的每个题目的出现频率,整理并收录了每个类别里高频出现的题目,对于官方统计频率太低的题目,不予收录,最终得到了这个高频题目表格。

例如,对于下图中题号#275#270的题目将被收录,并且#275出现频率大于#270;而对于题号#1011#1182的题目,因为出现频率太低,将不被收录:【leetcode】高频题目整理_数组篇( High Frequency Problems, Array )

撸起键盘加油干!祝大家成功上岸!整理不易,点个赞吧!


数组篇-132题(Array, 132 problems)

数据日期: 2020/03/26 (此时LeetCode题目数量:1582)
数据来源: LeetCode官方,将不同类别的题目按照官方给的出现频率(Frequency)降序排列,取有频率统计的题。

排序 题号 题目 通过率 难度
1 #1 Two Sum 0.479 简单
2 #4 Median of Two Sorted Arrays 0.372 困难
3 #15 3Sum 0.262 中等
4 #53 Maximum Subarray 0.499 简单
5 #42 Trapping Rain Water 0.495 困难
6 #11 Container With Most Water 0.622 中等
7 #85 Maximal Rectangle 0.449 困难
8 #16 3Sum Closest 0.435 中等
9 #31 Next Permutation 0.33 中等
10 #26 Remove Duplicates from Sorted Array 0.493 简单
11 #717 1-bit and 2-bit Characters 0.471 简单
12 #59 Spiral Matrix II 0.769 中等
13 #78 Subsets 0.769 中等
14 #39 Combination Sum 0.686 中等
15 #121 Best Time to Buy and Sell Stock 0.538 简单
16 #45 Jump Game II 0.335 困难
17 #88 Merge Sorted Array 0.471 简单
18 #18 4Sum 0.374 中等
19 #64 Minimum Path Sum 0.651 中等
20 #56 Merge Intervals 0.407 中等
21 #118 Pascal’s Triangle 0.66 简单
22 #561 Array Partition I 0.7 简单
23 #167 Two Sum II - Input array is sorted 0.531 简单
24 #128 Longest Consecutive Sequence 0.483 困难
25 #120 Triangle 0.641 中等
26 #169 Majority Element 0.628 简单
27 #48 Rotate Image 0.674 中等
28 #442 Find All Duplicates in an Array 0.644 中等
29 #289 Game of Life 0.696 中等
30 #105 Construct Binary Tree from Preorder and Inorder Traversal 0.646 中等
31 #238 Product of Array Except Self 0.671 中等
32 #41 First Missing Positive 0.378 困难
33 #287 Find the Duplicate Number 0.635 中等
34 #621 Task Scheduler 0.481 中等
35 #718 Maximum Length of Repeated Subarray 0.492 中等
36 #54 Spiral Matrix 0.392 中等
37 #941 Valid Mountain Array 0.351 简单
38 #747 Largest Number At Least Twice of Others 0.39 简单
39 #122 Best Time to Buy and Sell Stock II 0.584 简单
40 #560 Subarray Sum Equals K 0.443 中等
41 #448 Find All Numbers Disappeared in an Array 0.572 简单
42 #75 Sort Colors 0.547 中等
43 #628 Maximum Product of Three Numbers 0.494 简单
44 #66 Plus One 0.436 简单
45 #33 Search in Rotated Sorted Array 0.365 中等
46 #55 Jump Game 0.385 中等
47 #27 Remove Element 0.578 简单
48 #283 Move Zeroes 0.601 简单
49 #62 Unique Paths 0.596 中等
50 #216 Combination Sum III 0.705 中等
51 #79 Word Search 0.41 中等
52 #689 Maximum Sum of 3 Non-Overlapping Subarrays 0.445 困难
53 #695 Max Area of Island 0.632 中等
54 #697 Degree of an Array 0.521 简单
55 #268 Missing Number 0.548 简单
56 #152 Maximum Product Subarray 0.377 中等
57 #35 Search Insert Position 0.453 简单
58 #229 Majority Element II 0.428 中等
59 #123 Best Time to Buy and Sell Stock III 0.422 困难
60 #119 Pascal’s Triangle II 0.605 简单
61 #90 Subsets II 0.595 中等
62 #84 Largest Rectangle in Histogram 0.392 困难
63 #189 Rotate Array 0.409 简单
64 #209 Minimum Size Subarray Sum 0.418 中等
65 #57 Insert Interval 0.371 困难
66 #1217 Play with Chips 0.678 简单
67 #665 Non-decreasing Array 0.221 简单
68 #34 Find First and Last Position of Element in Sorted Array 0.392 中等
69 #661 Image Smoother 0.529 简单
70 #153 Find Minimum in Rotated Sorted Array 0.502 中等
71 #217 Contains Duplicate 0.518 简单
72 #667 Beautiful Arrangement II 0.592 中等
73 #73 Set Matrix Zeroes 0.552 中等
74 #219 Contains Duplicate II 0.379 简单
75 #40 Combination Sum II 0.609 中等
76 #714 Best Time to Buy and Sell Stock with Transaction Fee 0.635 中等
77 #81 Search in Rotated Sorted Array II 0.352 中等
78 #581 Shortest Unsorted Continuous Subarray 0.343 简单
79 #495 Teemo Attacking 0.531 中等
80 #162 Find Peak Element 0.453 中等
81 #905 Sort Array By Parity 0.684 简单
82 #611 Valid Triangle Number 0.483 中等
83 #106 Construct Binary Tree from Inorder and Postorder Traversal 0.675 中等
84 #1013 Partition Array Into Three Parts With Equal Sum 0.408 简单
85 #63 Unique Paths II 0.326 中等
86 #565 Array Nesting 0.567 中等
87 #414 Third Maximum Number 0.347 简单
88 #228 Summary Ranges 0.517 中等
89 #485 Max Consecutive Ones 0.561 简单
90 #566 Reshape the Matrix 0.643 简单
91 #670 Maximum Swap 0.4 中等
92 #870 Advantage Shuffle 0.37 中等
93 #713 Subarray Product Less Than K 0.349 中等
94 #643 Maximum Average Subarray I 0.381 简单
95 #80 Remove Duplicates from Sorted Array II 0.547 中等
96 #280 Wiggle Sort 0.684 中等
97 #605 Can Place Flowers 0.315 简单
98 #719 Find K-th Smallest Pair Distance 0.316 困难
99 #950 Reveal Cards In Increasing Order 0.755 中等
100 #74 Search a 2D Matrix 0.376 中等
101 #126 Word Ladder II 0.318 困难
102 #154 Find Minimum in Rotated Sorted Array II 0.478 困难
103 #1329 Sort the Matrix Diagonally 0.752 中等
104 #729 My Calendar I 0.461 中等
105 #644 Maximum Average Subarray II 0.336 困难
106 #674 Longest Continuous Increasing Subsequence 0.444 简单
107 #548 Split Array with Equal Sum 0.341 中等
108 #381 Insert Delete GetRandom O(1) - Duplicates allowed 0.369 困难
109 #532 K-diff Pairs in an Array 0.34 简单
110 #457 Circular Array Loop 0.332 中等
111 #962 Maximum Width Ramp 0.368 中等
112 #1031 Maximum Sum of Two Non-Overlapping Subarrays 0.508 中等
113 #245 Shortest Word Distance III 0.623 中等
114 #724 Find Pivot Index 0.366 简单
115 #1002 Find Common Characters 0.667 简单
116 #380 Insert Delete GetRandom O(1) 0.478 中等
117 #954 Array of Doubled Pairs 0.274 中等
118 #1386 Cinema Seat Allocation 0.239 中等
119 #163 Missing Ranges 0.248 中等
120 #370 Range Addition 0.651 中等
121 #243 Shortest Word Distance 0.64 简单
122 #277 Find the Celebrity 0.565 中等
123 #259 3Sum Smaller 0.557 中等
124 #1074 Number of Submatrices That Sum to Target 0.435 困难
125 #562 Longest Line of Consecutive One in Matrix 0.394 中等
126 #533 Lonely Pixel II 0.454 中等
127 #978 Longest Turbulent Subarray 0.392 中等
128 #1287 Element Appearing More Than 25% In Sorted Array 0.607 简单
129 #723 Candy Crush 0.676 中等
130 #624 Maximum Distance in Arrays 0.406 简单
131 #531 Lonely Pixel I 0.651 中等
132 #1232 Check If It Is a Straight Line 0.508 简单

相关/参考链接

leetcode-cn
leetcode

上一篇:算法训练营——字符串算法(第十四课)


下一篇:leetcode 题目分类