【leetcode】高频题目整理

    科技2022-07-11  95

    截止至今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

    Processed: 0.009, SQL: 8