截止至今LeetCode题目总量已经有1582题
,估计将来每年平均增长300题
左右,大部分人肯定是刷不完的
,所以得有选择地刷LeetCode。
一种公认的刷题策略是按类别刷题
,可是每个类别也有许多题,在有限的时间里到底该刷哪些题呢
?个人根据LeetCode官方
给出的每个题目的出现频率
,整理并收录了每个类别里高频出现
的题目,对于官方统计频率太低的题目,不予收录,最终得到了这个高频题目表格。
例如,对于下图中题号#275
与#270
的题目将被收录,并且#275
出现频率大于#270
;而对于题号#1011
与#1182
的题目,因为出现频率太低,将不被收录:
撸起键盘加油干!祝大家成功上岸!整理不易,点个赞吧!
深度优先遍历篇-69题(Depth-first Search, 69 problems)
2020/03/29更新: 之前有些题目的跳转链接不对,现在已经改过来了
数据日期: 2020/03/26 (此时LeetCode题目数量:1582)
数据来源: LeetCode官方,将不同类别的题目按照官方给的出现频率(Frequency)降序排列,取有频率统计的题。
排序 | 题号 | 题目 | 通过率 | 难度 |
---|---|---|---|---|
1 | #679 | 24 Game | 0.424 | 困难 |
2 | #104 | Maximum Depth of Binary Tree | 0.726 | 简单 |
3 | #108 | Convert Sorted Array to Binary Search Tree | 0.699 | 简单 |
4 | #546 | Remove Boxes | 0.496 | 困难 |
5 | #394 | Decode String | 0.493 | 中等 |
6 | #114 | Flatten Binary Tree to Linked List | 0.681 | 中等 |
7 | #105 | Construct Binary Tree from Preorder and Inorder Traversal | 0.646 | 中等 |
8 | #488 | Zuma Game | 0.406 | 困难 |
9 | #101 | Symmetric Tree | 0.506 | 简单 |
10 | #109 | Convert Sorted List to Binary Search Tree | 0.711 | 中等 |
11 | #542 | 01 Matrix | 0.381 | 中等 |
12 | #199 | Binary Tree Right Side View | 0.639 | 中等 |
13 | #491 | Increasing Subsequences | 0.463 | 中等 |
14 | #200 | Number of Islands | 0.478 | 中等 |
15 | #257 | Binary Tree Paths | 0.63 | 简单 |
16 | #301 | Remove Invalid Parentheses | 0.452 | 困难 |
17 | #124 | Binary Tree Maximum Path Sum | 0.397 | 困难 |
18 | #695 | Max Area of Island | 0.632 | 中等 |
19 | #112 | Path Sum | 0.493 | 简单 |
20 | #638 | Shopping Offers | 0.571 | 中等 |
21 | #664 | Strange Printer | 0.43 | 困难 |
22 | #690 | Employee Importance | 0.575 | 简单 |
23 | #207 | Course Schedule | 0.496 | 中等 |
24 | #100 | Same Tree | 0.569 | 简单 |
25 | #133 | Clone Graph | 0.525 | 中等 |
26 | #111 | Minimum Depth of Binary Tree | 0.418 | 简单 |
27 | #329 | Longest Increasing Path in a Matrix | 0.401 | 困难 |
28 | #130 | Surrounded Regions | 0.398 | 中等 |
29 | #337 | House Robber III | 0.564 | 中等 |
30 | #110 | Balanced Binary Tree | 0.509 | 简单 |
31 | #99 | Recover Binary Search Tree | 0.559 | 困难 |
32 | #863 | All Nodes Distance K in Binary Tree | 0.477 | 中等 |
33 | #332 | Reconstruct Itinerary | 0.363 | 中等 |
34 | #515 | Find Largest Value in Each Tree Row | 0.585 | 中等 |
35 | #547 | Friend Circles | 0.557 | 中等 |
36 | #733 | Flood Fill | 0.53 | 简单 |
37 | #513 | Find Bottom Left Tree Value | 0.688 | 中等 |
38 | #721 | Accounts Merge | 0.323 | 中等 |
39 | #113 | Path Sum II | 0.589 | 中等 |
40 | #106 | Construct Binary Tree from Inorder and Postorder Traversal | 0.675 | 中等 |
41 | #514 | Freedom Trail | 0.38 | 困难 |
42 | #529 | Minesweeper | 0.594 | 中等 |
43 | #473 | Matchsticks to Square | 0.371 | 中等 |
44 | #417 | Pacific Atlantic Water Flow | 0.408 | 中等 |
45 | #494 | Target Sum | 0.441 | 中等 |
46 | #129 | Sum Root to Leaf Numbers | 0.624 | 中等 |
47 | #98 | Validate Binary Search Tree | 0.295 | 中等 |
48 | #971 | Flip Binary Tree To Match Preorder Traversal | 0.43 | 中等 |
49 | #210 | Course Schedule II | 0.465 | 中等 |
50 | #576 | Out of Boundary Paths | 0.36 | 中等 |
51 | #711 | Number of Distinct Islands II | 0.561 | 困难 |
52 | #685 | Redundant Connection II | 0.335 | 困难 |
53 | #472 | Concatenated Words | 0.438 | 困难 |
54 | #1254 | Number of Closed Islands | 0.589 | 中等 |
55 | #339 | Nested List Weight Sum | 0.777 | 简单 |
56 | #116 | Populating Next Right Pointers in Each Node | 0.564 | 中等 |
57 | #439 | Ternary Expression Parser | 0.548 | 中等 |
58 | #505 | The Maze II | 0.439 | 中等 |
59 | #490 | The Maze | 0.442 | 中等 |
60 | #117 | Populating Next Right Pointers in Each Node II | 0.464 | 中等 |
61 | #694 | Number of Distinct Islands | 0.457 | 中等 |
62 | #323 | Number of Connected Components in an Undirected Graph | 0.553 | 中等 |
63 | #499 | The Maze III | 0.303 | 困难 |
64 | #261 | Graph Valid Tree | 0.449 | 中等 |
65 | #737 | Sentence Similarity II | 0.41 | 中等 |
66 | #533 | Lonely Pixel II | 0.454 | 中等 |
67 | #366 | Find Leaves of Binary Tree | 0.73 | 中等 |
68 | #364 | Nested List Weight Sum II | 0.687 | 中等 |
69 | #531 | Lonely Pixel I | 0.651 | 中等 |
相关/参考链接
leetcode-cn
leetcode