【leetcode】高頻題目整理_樹結構篇( High Frequency Problems, Tree )

飛豬飛飛發表於2020-10-03

截止至今LeetCode題目總量已經有1582題,估計將來每年平均增長300題左右,大部分人肯定是刷不完的,所以得有選擇地刷LeetCode。

一種公認的刷題策略是按類別刷題,可是每個類別也有許多題,在有限的時間裡到底該刷哪些題呢?個人根據LeetCode官方給出的每個題目的出現頻率,整理並收錄了每個類別裡高頻出現的題目,對於官方統計頻率太低的題目,不予收錄,最終得到了這個高頻題目表格。

例如,對於下圖中題號#275#270的題目將被收錄,並且#275出現頻率大於#270;而對於題號#1011#1182的題目,因為出現頻率太低,將不被收錄:在這裡插入圖片描述

擼起鍵盤加油幹!祝大家成功上岸!整理不易,點個贊吧!


樹結構篇-82題(Tree, 82 problems)

資料日期: 2020/03/26 (此時LeetCode題目數量:1582)
資料來源: LeetCode官方,將不同類別的題目按照官方給的出現頻率(Frequency)降序排列,取有頻率統計的題。

排序題號題目通過率難度
1#95Unique Binary Search Trees II0.623中等
2#94Binary Tree Inorder Traversal0.707中等
3#96Unique Binary Search Trees0.652中等
4#226Invert Binary Tree0.745簡單
5#104Maximum Depth of Binary Tree0.726簡單
6#108Convert Sorted Array to Binary Search Tree0.699簡單
7#617Merge Two Binary Trees0.755簡單
8#107Binary Tree Level Order Traversal II0.647簡單
9#543Diameter of Binary Tree0.49簡單
10#114Flatten Binary Tree to Linked List0.681中等
11#105Construct Binary Tree from Preorder and Inorder Traversal0.646中等
12#101Symmetric Tree0.506簡單
13#687Longest Univalue Path0.394簡單
14#654Maximum Binary Tree0.798中等
15#655Print Binary Tree0.553中等
16#449Serialize and Deserialize BST0.51中等
17#199Binary Tree Right Side View0.639中等
18#257Binary Tree Paths0.63簡單
19#102Binary Tree Level Order Traversal0.613中等
20#144Binary Tree Preorder Traversal0.648中等
21#669Trim a Binary Search Tree0.646簡單
22#538Convert BST to Greater Tree0.596簡單
23#124Binary Tree Maximum Path Sum0.397困難
24#112Path Sum0.493簡單
25#145Binary Tree Postorder Traversal0.707困難
26#501Find Mode in Binary Search Tree0.441簡單
27#100Same Tree0.569簡單
28#530Minimum Absolute Difference in BST0.56簡單
29#222Count Complete Tree Nodes0.678中等
30#111Minimum Depth of Binary Tree0.418簡單
31#637Average of Levels in Binary Tree0.637簡單
32#437Path Sum III0.545簡單
33#173Binary Search Tree Iterator0.718中等
34#337House Robber III0.564中等
35#653Two Sum IV - Input is a BST0.544簡單
36#404Sum of Left Leaves0.542簡單
37#110Balanced Binary Tree0.509簡單
38#776Split BST0.552中等
39#99Recover Binary Search Tree0.559困難
40#863All Nodes Distance K in Binary Tree0.477中等
41#103Binary Tree Zigzag Level Order Traversal0.54中等
42#563Binary Tree Tilt0.537簡單
43#684Redundant Connection0.571中等
44#235Lowest Common Ancestor of a Binary Search Tree0.629簡單
45#515Find Largest Value in Each Tree Row0.585中等
46#297Serialize and Deserialize Binary Tree0.458困難
47#236Lowest Common Ancestor of a Binary Tree0.608中等
48#513Find Bottom Left Tree Value0.688中等
49#606Construct String from Binary Tree0.527簡單
50#652Find Duplicate Subtrees0.527中等
51#113Path Sum II0.589中等
52#106Construct Binary Tree from Inorder and Postorder Traversal0.675中等
53#508Most Frequent Subtree Sum0.627中等
54#230Kth Smallest Element in a BST0.694中等
55#129Sum Root to Leaf Numbers0.624中等
56#662Maximum Width of Binary Tree0.358中等
57#783Minimum Distance Between BST Nodes0.52簡單
58#98Validate Binary Search Tree0.295中等
59#572Subtree of Another Tree0.439簡單
60#671Second Minimum Node In a Binary Tree0.459簡單
61#450Delete Node in a BST0.392中等
62#250Count Univalue Subtrees0.619中等
63#685Redundant Connection II0.335困難
64#623Add One Row to Tree0.505中等
65#116Populating Next Right Pointers in Each Node0.564中等
66#998Maximum Binary Tree II0.593中等
67#255Verify Preorder Sequence in Binary Search Tree0.458中等
68#333Largest BST Subtree0.421中等
69#1008Construct Binary Search Tree from Preorder Traversal0.717中等
70#117Populating Next Right Pointers in Each Node II0.464中等
71#988Smallest String Starting From Leaf0.442中等
72#270Closest Binary Search Tree Value0.506簡單
73#549Binary Tree Longest Consecutive Sequence II0.473中等
74#582Kill Process0.346中等
75#156Binary Tree Upside Down0.73中等
76#285Inorder Successor in BST0.607中等
77#272Closest Binary Search Tree Value II0.587困難
78#666Path Sum IV0.585中等
79#366Find Leaves of Binary Tree0.73中等
80#536Construct Binary Tree from String0.513中等
81#545Boundary of Binary Tree0.349中等
82#298Binary Tree Longest Consecutive Sequence0.54中等

相關/參考連結

leetcode-cn
leetcode

相關文章