1. 程式人生 > >【LeetCode】深搜DFS(共85題)

【LeetCode】深搜DFS(共85題)

【98】Validate Binary Search Tree 

【99】Recover Binary Search Tree 

【100】Same Tree 

【101】Symmetric Tree 

【104】Maximum Depth of Binary Tree 

【105】Construct Binary Tree from Preorder and Inorder Traversal 

【106】Construct Binary Tree from Inorder and Postorder Traversal 

【108】Convert Sorted Array to Binary Search Tree 

【109】Convert Sorted List to Binary Search Tree 

【110】Balanced Binary Tree 

【111】Minimum Depth of Binary Tree 

【112】Path Sum 

【113】Path Sum II 

【114】Flatten Binary Tree to Linked List 

【116】Populating Next Right Pointers in Each Node 

【117】Populating Next Right Pointers in Each Node II 

【124】Binary Tree Maximum Path Sum 

【129】Sum Root to Leaf Numbers 

【130】Surrounded Regions 

【133】Clone Graph 

【199】Binary Tree Right Side View 

【200】Number of Islands 

【207】Course Schedule 

【210】Course Schedule II 

【257】Binary Tree Paths 

【261】Graph Valid Tree 

【301】Remove Invalid Parentheses 

【323】Number of Connected Components in an Undirected Graph 

【329】Longest Increasing Path in a Matrix 

【332】Reconstruct Itinerary 

【337】House Robber III 

【339】Nested List Weight Sum 

【364】Nested List Weight Sum II 

【366】Find Leaves of Binary Tree 

【394】Decode String 

【417】Pacific Atlantic Water Flow 

【430】Flatten a Multilevel Doubly Linked List 

【439】Ternary Expression Parser 

【472】Concatenated Words 

【473】Matchsticks to Square 

【488】Zuma Game 

【489】Robot Room Cleaner 

【490】The Maze 

【491】Increasing Subsequences 

【494】Target Sum 

【499】The Maze III 

【505】The Maze II 

【513】Find Bottom Left Tree Value 

【514】Freedom Trail 

【515】Find Largest Value in Each Tree Row 

【529】Minesweeper 

【531】Lonely Pixel I 

【533】Lonely Pixel II 

【542】01 Matrix 

【546】Remove Boxes 

【547】Friend Circles 

【559】Maximum Depth of N-ary Tree 

【576】Out of Boundary Paths 

【638】Shopping Offers 

【664】Strange Printer 

【679】24 Game 

【685】Redundant Connection II 

【690】Employee Importance 

【694】Number of Distinct Islands 

【695】Max Area of Island 

【711】Number of Distinct Islands II 

【721】Accounts Merge 

【733】Flood Fill 

【737】Sentence Similarity II 

【743】Network Delay Time 

【749】Contain Virus 

【753】Cracking the Safe 

【756】Pyramid Transition Matrix 

【778】Swim in Rising Water 

【785】Is Graph Bipartite? 

【802】Find Eventual Safe States 

【827】Making A Large Island 

【834】Sum of Distances in Tree 

【839】Similar String Groups 

【841】Keys and Rooms 

【851】Loud and Rich 

【863】All Nodes Distance K in Binary Tree 

【872】Leaf-Similar Trees 

【886】Possible Bipartition 

【897】Increasing Order Search Tree