2.09 Depth First Search

Depth First Search #

No.TitleSolutionDifficultyTimeComplexitySpaceComplexityFavoriteAcceptance
0094Binary Tree Inorder TraversalGoEasy69.1%
0098Validate Binary Search TreeGoMediumO(n)O(1)29.8%
0099Recover Binary Search TreeGoMediumO(n)O(1)45.0%
0100Same TreeGoEasyO(n)O(1)54.9%
0101Symmetric TreeGoEasyO(n)O(1)50.4%
0104Maximum Depth of Binary TreeGoEasyO(n)O(1)70.3%
0110Balanced Binary TreeGoEasyO(n)O(1)45.9%
0111Minimum Depth of Binary TreeGoEasyO(n)O(1)41.4%
0112Path SumGoEasyO(n)O(1)44.3%
0113Path Sum IIGoMediumO(n)O(1)52.6%
0114Flatten Binary Tree to Linked ListGoMediumO(n)O(1)56.0%
0116Populating Next Right Pointers in Each NodeGoMedium53.5%
0124Binary Tree Maximum Path SumGoHardO(n)O(1)36.9%
0129Sum Root to Leaf NumbersGoMediumO(n)O(1)55.1%
0130Surrounded RegionsGoMedium32.7%
0144Binary Tree Preorder TraversalGoEasy60.5%
0145Binary Tree Postorder TraversalGoEasy61.6%
0199Binary Tree Right Side ViewGoMediumO(n)O(1)58.4%
0200Number of IslandsGoMediumO(n^2)O(n^2)52.2%
0207Course ScheduleGoMediumO(n^2)O(n^2)44.7%
0210Course Schedule IIGoMediumO(n^2)O(n^2)45.1%
0211Design Add and Search Words Data StructureGoMedium42.6%
0222Count Complete Tree NodesGoMedium53.6%
0226Invert Binary TreeGoEasy70.1%
0230Kth Smallest Element in a BSTGoMedium65.3%
0235Lowest Common Ancestor of a Binary Search TreeGoEasy55.2%
0236Lowest Common Ancestor of a Binary TreeGoMedium53.1%
0257Binary Tree PathsGoEasyO(n)O(1)56.8%
0297Serialize and Deserialize Binary TreeGoHard52.4%
0329Longest Increasing Path in a MatrixGoHard48.4%
0337House Robber IIIGoMedium52.5%
0341Flatten Nested List IteratorGoMedium57.6%
0385Mini ParserGoMedium35.4%
0386Lexicographical NumbersGoMedium57.1%
0399Evaluate DivisionGoMedium56.1%
0404Sum of Left LeavesGoEasy54.3%
0417Pacific Atlantic Water FlowGoMedium46.8%
0437Path Sum IIIGoMedium49.7%
0463Island PerimeterGoEasy68.4%
0508Most Frequent Subtree SumGoMedium61.5%
0513Find Bottom Left Tree ValueGoMedium64.2%
0515Find Largest Value in Each Tree RowGoMediumO(n)O(n)63.8%
0529MinesweeperGoMedium63.6%
0530Minimum Absolute Difference in BSTGoEasy55.8%
0538Convert BST to Greater TreeGoMedium61.8%
0543Diameter of Binary TreeGoEasy52.6%
0547Number of ProvincesGoMedium62.3%
0559Maximum Depth of N-ary TreeGoEasy70.4%
0563Binary Tree TiltGoEasy55.0%
0572Subtree of Another TreeGoEasy44.9%
0589N-ary Tree Preorder TraversalGoEasy75.3%
0617Merge Two Binary TreesGoEasy77.0%
0623Add One Row to TreeGoMedium53.5%
0637Average of Levels in Binary TreeGoEasy67.6%
0653Two Sum IV - Input is a BSTGoEasy58.1%
0662Maximum Width of Binary TreeGoMedium39.7%
0669Trim a Binary Search TreeGoMedium64.4%
0684Redundant ConnectionGoMedium60.6%
0685Redundant Connection IIGoHard33.4%
0690Employee ImportanceGoMedium62.0%
0695Max Area of IslandGoMedium68.2%
0721Accounts MergeGoMedium54.4%
0733Flood FillGoEasy57.0%
0753Cracking the SafeGoHard53.9%
0756Pyramid Transition MatrixGoMedium55.4%
0765Couples Holding HandsGoHard56.2%
0778Swim in Rising WaterGoHard58.1%
0783Minimum Distance Between BST NodesGoEasy55.4%
0785Is Graph Bipartite?GoMedium49.6%
0802Find Eventual Safe StatesGoMedium51.4%
0834Sum of Distances in TreeGoHard52.4%
0839Similar String GroupsGoHard44.2%
0841Keys and RoomsGoMedium67.8%
0851Loud and RichGoMedium55.1%
0863All Nodes Distance K in Binary TreeGoMedium60.0%
0872Leaf-Similar TreesGoEasy64.7%
0897Increasing Order Search TreeGoEasy75.6%
0924Minimize Malware SpreadGoHard41.8%
0928Minimize Malware Spread IIGoHard41.8%
0938Range Sum of BSTGoEasy84.1%
0947Most Stones Removed with Same Row or ColumnGoMedium56.2%
0959Regions Cut By SlashesGoMedium68.3%
0968Binary Tree CamerasGoHard41.2%
0971Flip Binary Tree To Match Preorder TraversalGoMedium49.9%
0979Distribute Coins in Binary TreeGoMedium70.8%
0987Vertical Order Traversal of a Binary TreeGoHard40.1%
0993Cousins in Binary TreeGoEasy53.6%
1020Number of EnclavesGoMedium60.9%
1026Maximum Difference Between Node and AncestorGoMedium70.8%
1028Recover a Tree From Preorder TraversalGoHard71.9%
1038Binary Search Tree to Greater Sum TreeGoMedium84.0%
1110Delete Nodes And Return ForestGoMedium68.8%
1123Lowest Common Ancestor of Deepest LeavesGoMedium69.2%
1145Binary Tree Coloring GameGoMedium51.1%
1202Smallest String With SwapsGoMedium51.3%
1203Sort Items by Groups Respecting DependenciesGoHard49.0%
1254Number of Closed IslandsGoMedium62.7%
1302Deepest Leaves SumGoMedium85.6%
1305All Elements in Two Binary Search TreesGoMedium78.6%
1306Jump Game IIIGoMedium61.5%
1319Number of Operations to Make Network ConnectedGoMedium56.5%
1600Throne InheritanceGoMedium62.3%
1631Path With Minimum EffortGoMedium51.2%
——————————————————————-——-—————-—————————-————-————-

⬅️上一页

下一页➡️

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