2.09 Depth First Search

Depth First Search #

No.TitleSolutionDifficultyTimeComplexitySpaceComplexityFavoriteAcceptance
0094Binary Tree Inorder TraversalGoEasy73.8%
0098Validate Binary Search TreeGoMediumO(n)O(1)32.0%
0099Recover Binary Search TreeGoMediumO(n)O(1)51.0%
0100Same TreeGoEasyO(n)O(1)58.2%
0101Symmetric TreeGoEasyO(n)O(1)54.3%
0104Maximum Depth of Binary TreeGoEasyO(n)O(1)73.9%
0110Balanced Binary TreeGoEasyO(n)O(1)49.1%
0111Minimum Depth of Binary TreeGoEasyO(n)O(1)44.5%
0112Path SumGoEasyO(n)O(1)48.3%
0113Path Sum IIGoMediumO(n)O(1)57.1%
0114Flatten Binary Tree to Linked ListGoMediumO(n)O(1)61.8%
0116Populating Next Right Pointers in Each NodeGoMedium60.4%
0124Binary Tree Maximum Path SumGoHardO(n)O(1)39.2%
0129Sum Root to Leaf NumbersGoMediumO(n)O(1)61.0%
0130Surrounded RegionsGoMedium36.8%
0144Binary Tree Preorder TraversalGoEasy66.9%
0145Binary Tree Postorder TraversalGoEasy68.0%
0199Binary Tree Right Side ViewGoMediumO(n)O(1)61.6%
0200Number of IslandsGoMediumO(n^2)O(n^2)57.0%
0207Course ScheduleGoMediumO(n^2)O(n^2)45.4%
0210Course Schedule IIGoMediumO(n^2)O(n^2)48.5%
0211Design Add and Search Words Data StructureGoMedium44.0%
0222Count Complete Tree NodesGoMedium60.6%
0226Invert Binary TreeGoEasy74.7%
0230Kth Smallest Element in a BSTGoMedium70.2%
0235Lowest Common Ancestor of a Binary Search TreeGoMedium61.6%
0236Lowest Common Ancestor of a Binary TreeGoMedium58.8%
0257Binary Tree PathsGoEasyO(n)O(1)61.4%
0297Serialize and Deserialize Binary TreeGoHard55.4%
0329Longest Increasing Path in a MatrixGoHard52.4%
0337House Robber IIIGoMedium53.9%
0341Flatten Nested List IteratorGoMedium61.8%
0385Mini ParserGoMedium36.9%
0386Lexicographical NumbersGoMedium61.6%
0399Evaluate DivisionGoMedium59.7%
0404Sum of Left LeavesGoEasy56.7%
0417Pacific Atlantic Water FlowGoMedium54.4%
0419Battleships in a BoardGoMedium74.8%
0437Path Sum IIIGoMedium48.0%
0463Island PerimeterGoEasy69.7%
0508Most Frequent Subtree SumGoMedium64.9%
0513Find Bottom Left Tree ValueGoMedium66.9%
0515Find Largest Value in Each Tree RowGoMediumO(n)O(n)64.6%
0529MinesweeperGoMedium65.7%
0530Minimum Absolute Difference in BSTGoEasy57.3%
0538Convert BST to Greater TreeGoMedium67.8%
0543Diameter of Binary TreeGoEasy56.8%
0547Number of ProvincesGoMedium63.8%
0559Maximum Depth of N-ary TreeGoEasy71.7%
0563Binary Tree TiltGoEasy60.1%
0572Subtree of Another TreeGoEasy46.4%
0589N-ary Tree Preorder TraversalGoEasy75.8%
0617Merge Two Binary TreesGoEasy78.7%
0623Add One Row to TreeGoMedium59.5%
0637Average of Levels in Binary TreeGoEasy71.7%
0653Two Sum IV - Input is a BSTGoEasy61.0%
0662Maximum Width of Binary TreeGoMedium40.7%
0669Trim a Binary Search TreeGoMedium66.4%
0684Redundant ConnectionGoMedium62.2%
0685Redundant Connection IIGoHard34.1%
0690Employee ImportanceGoMedium65.6%
0695Max Area of IslandGoMedium71.8%
0721Accounts MergeGoMedium56.3%
0733Flood FillGoEasy62.0%
0753Cracking the SafeGoHard55.8%
0756Pyramid Transition MatrixGoMedium52.7%
0765Couples Holding HandsGoHard56.6%
0778Swim in Rising WaterGoHard59.8%
0783Minimum Distance Between BST NodesGoEasy59.3%
0785Is Graph Bipartite?GoMedium53.1%
0802Find Eventual Safe StatesGoMedium56.6%
0834Sum of Distances in TreeGoHard59.1%
0839Similar String GroupsGoHard48.0%
0841Keys and RoomsGoMedium71.5%
0851Loud and RichGoMedium58.4%
0863All Nodes Distance K in Binary TreeGoMedium62.3%
0872Leaf-Similar TreesGoEasy67.6%
0897Increasing Order Search TreeGoEasy78.4%
0924Minimize Malware SpreadGoHard42.1%
0928Minimize Malware Spread IIGoHard42.8%
0938Range Sum of BSTGoEasy85.9%
0947Most Stones Removed with Same Row or ColumnGoMedium58.9%
0959Regions Cut By SlashesGoMedium69.1%
0968Binary Tree CamerasGoHard46.6%
0971Flip Binary Tree To Match Preorder TraversalGoMedium50.0%
0979Distribute Coins in Binary TreeGoMedium72.2%
0987Vertical Order Traversal of a Binary TreeGoHard45.1%
0993Cousins in Binary TreeGoEasy54.6%
1020Number of EnclavesGoMedium65.6%
1022Sum of Root To Leaf Binary NumbersGoEasy73.5%
1026Maximum Difference Between Node and AncestorGoMedium75.8%
1028Recover a Tree From Preorder TraversalGoHard73.3%
1034Coloring A BorderGoMedium49.2%
1038Binary Search Tree to Greater Sum TreeGoMedium85.5%
1110Delete Nodes And Return ForestGoMedium69.3%
1123Lowest Common Ancestor of Deepest LeavesGoMedium70.9%
1145Binary Tree Coloring GameGoMedium51.7%
1202Smallest String With SwapsGoMedium57.7%
1203Sort Items by Groups Respecting DependenciesGoHard51.2%
1254Number of Closed IslandsGoMedium66.9%
1302Deepest Leaves SumGoMedium86.6%
1305All Elements in Two Binary Search TreesGoMedium79.8%
1306Jump Game IIIGoMedium63.5%
1319Number of Operations to Make Network ConnectedGoMedium62.1%
1600Throne InheritanceGoMedium63.6%
1631Path With Minimum EffortGoMedium55.7%
2096Step-By-Step Directions From a Binary Tree Node to AnotherGoMedium48.5%
——————————————————————-——-—————-—————————-————-————-

⬅️上一页

下一页➡️

Calendar Apr 8, 2023
Edit Edit this page
本站总访问量:  次 您是本站第  位访问者