2.06 Tree

Tree #

No.TitleSolutionDifficultyTimeComplexitySpaceComplexityFavoriteAcceptance
0094Binary Tree Inorder TraversalGoEasyO(n)O(1)67.4%
0095Unique Binary Search Trees IIGoMedium44.2%
0096Unique Binary Search TreesGoMediumO(n^2)O(n)55.3%
0098Validate Binary Search TreeGoMediumO(n)O(1)29.3%
0099Recover Binary Search TreeGoMediumO(n)O(1)43.7%
0100Same TreeGoEasyO(n)O(1)54.5%
0101Symmetric TreeGoEasyO(n)O(1)49.3%
0102Binary Tree Level Order TraversalGoMediumO(n)O(1)58.1%
0103Binary Tree Zigzag Level Order TraversalGoMediumO(n)O(n)51.2%
0104Maximum Depth of Binary TreeGoEasyO(n)O(1)69.1%
0105Construct Binary Tree from Preorder and Inorder TraversalGoMedium54.1%
0106Construct Binary Tree from Inorder and Postorder TraversalGoMedium51.3%
0107Binary Tree Level Order Traversal IIGoMediumO(n)O(1)56.3%
0108Convert Sorted Array to Binary Search TreeGoEasyO(n)O(1)62.1%
0109Convert Sorted List to Binary Search TreeGoMedium52.7%
0110Balanced Binary TreeGoEasyO(n)O(1)45.3%
0111Minimum Depth of Binary TreeGoEasyO(n)O(1)40.5%
0112Path SumGoEasyO(n)O(1)43.2%
0113Path Sum IIGoMediumO(n)O(1)50.5%
0114Flatten Binary Tree to Linked ListGoMediumO(n)O(1)54.2%
0124Binary Tree Maximum Path SumGoHardO(n)O(1)36.1%
0129Sum Root to Leaf NumbersGoMediumO(n)O(1)52.3%
0144Binary Tree Preorder TraversalGoEasyO(n)O(1)58.8%
0145Binary Tree Postorder TraversalGoEasyO(n)O(1)59.4%
0173Binary Search Tree IteratorGoMediumO(n)O(1)61.7%
0199Binary Tree Right Side ViewGoMediumO(n)O(1)57.2%
0222Count Complete Tree NodesGoMediumO(n)O(1)50.9%
0226Invert Binary TreeGoEasyO(n)O(1)68.3%
0230Kth Smallest Element in a BSTGoMediumO(n)O(1)63.9%
0235Lowest Common Ancestor of a Binary Search TreeGoEasyO(n)O(1)53.1%
0236Lowest Common Ancestor of a Binary TreeGoMediumO(n)O(1)51.0%
0257Binary Tree PathsGoEasyO(n)O(1)55.2%
0297Serialize and Deserialize Binary TreeGoHard51.1%
0331Verify Preorder Serialization of a Binary TreeGoMedium41.4%
0337House Robber IIIGoMedium52.2%
0341Flatten Nested List IteratorGoMedium56.6%
0404Sum of Left LeavesGoEasyO(n)O(1)52.7%
0437Path Sum IIIGoMediumO(n)O(1)48.7%
0508Most Frequent Subtree SumGoMedium60.2%
0513Find Bottom Left Tree ValueGoMedium63.4%
0515Find Largest Value in Each Tree RowGoMediumO(n)O(n)62.9%
0530Minimum Absolute Difference in BSTGoEasy55.4%
0538Convert BST to Greater TreeGoMedium60.7%
0563Binary Tree TiltGoEasy54.1%
0572Subtree of Another TreeGoEasy44.7%
0589N-ary Tree Preorder TraversalGoEasy74.7%
0617Merge Two Binary TreesGoEasy76.0%
0623Add One Row to TreeGoMedium53.2%
0637Average of Levels in Binary TreeGoEasyO(n)O(n)66.7%
0653Two Sum IV - Input is a BSTGoEasy56.7%
0662Maximum Width of Binary TreeGoMedium39.5%
0669Trim a Binary Search TreeGoMedium64.4%
0703Kth Largest Element in a StreamGoEasy51.4%
0783Minimum Distance Between BST NodesGoEasy54.7%
0834Sum of Distances in TreeGoHard47.5%
0863All Nodes Distance K in Binary TreeGoMedium58.8%
0872Leaf-Similar TreesGoEasy64.6%
0897Increasing Order Search TreeGoEasy75.1%
0938Range Sum of BSTGoEasy83.6%
0968Binary Tree CamerasGoHard40.8%
0971Flip Binary Tree To Match Preorder TraversalGoMedium49.9%
0979Distribute Coins in Binary TreeGoMedium70.3%
0987Vertical Order Traversal of a Binary TreeGoHard39.3%
0993Cousins in Binary TreeGoEasyO(n)O(1)52.4%
1026Maximum Difference Between Node and AncestorGoMedium70.2%
1028Recover a Tree From Preorder TraversalGoHard71.3%
1038Binary Search Tree to Greater Sum TreeGoMedium83.3%
1110Delete Nodes And Return ForestGoMedium68.2%
1123Lowest Common Ancestor of Deepest LeavesGoMedium68.5%
1145Binary Tree Coloring GameGoMedium51.1%
1302Deepest Leaves SumGoMedium85.4%
1305All Elements in Two Binary Search TreesGoMedium78.0%
1600Throne InheritanceGoMedium61.6%
——————————————————————-——-—————-—————————-————-————-

⬅️上一页

下一页➡️

Calendar Jul 16, 2021
Edit Edit this page
本站总访问量:  次 您是本站第  位访问者