Back to Leetcode Go

2.10 Breadth First Search

website/content/ChapterTwo/Breadth_First_Search.md

1.7.110.6 KB
Original Source

Breadth First Search

No.TitleSolutionDifficultyTimeComplexitySpaceComplexityFavoriteAcceptance
0100Same Tree[Go]({{< relref "/ChapterFour/0100~0199/0100.Same-Tree.md" >}})Easy58.2%
0101Symmetric Tree[Go]({{< relref "/ChapterFour/0100~0199/0101.Symmetric-Tree.md" >}})EasyO(n)O(1)54.3%
0102Binary Tree Level Order Traversal[Go]({{< relref "/ChapterFour/0100~0199/0102.Binary-Tree-Level-Order-Traversal.md" >}})MediumO(n)O(1)64.4%
0103Binary Tree Zigzag Level Order Traversal[Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})MediumO(n)O(n)56.9%
0104Maximum Depth of Binary Tree[Go]({{< relref "/ChapterFour/0100~0199/0104.Maximum-Depth-of-Binary-Tree.md" >}})Easy73.9%
0107Binary Tree Level Order Traversal II[Go]({{< relref "/ChapterFour/0100~0199/0107.Binary-Tree-Level-Order-Traversal-II.md" >}})MediumO(n)O(1)61.2%
0111Minimum Depth of Binary Tree[Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}})EasyO(n)O(1)44.5%
0112Path Sum[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})Easy48.3%
0116Populating Next Right Pointers in Each Node[Go]({{< relref "/ChapterFour/0100~0199/0116.Populating-Next-Right-Pointers-in-Each-Node.md" >}})Medium60.4%
0126Word Ladder II[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})HardO(n)O(n^2)❤️27.5%
0127Word Ladder[Go]({{< relref "/ChapterFour/0100~0199/0127.Word-Ladder.md" >}})HardO(n)O(n)37.2%
0130Surrounded Regions[Go]({{< relref "/ChapterFour/0100~0199/0130.Surrounded-Regions.md" >}})Medium36.8%
0199Binary Tree Right Side View[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})MediumO(n)O(1)61.6%
0200Number of Islands[Go]({{< relref "/ChapterFour/0200~0299/0200.Number-of-Islands.md" >}})MediumO(n^2)O(n^2)57.0%
0207Course Schedule[Go]({{< relref "/ChapterFour/0200~0299/0207.Course-Schedule.md" >}})MediumO(n^2)O(n^2)45.4%
0210Course Schedule II[Go]({{< relref "/ChapterFour/0200~0299/0210.Course-Schedule-II.md" >}})MediumO(n^2)O(n^2)48.5%
0226Invert Binary Tree[Go]({{< relref "/ChapterFour/0200~0299/0226.Invert-Binary-Tree.md" >}})Easy74.7%
0279Perfect Squares[Go]({{< relref "/ChapterFour/0200~0299/0279.Perfect-Squares.md" >}})Medium52.7%
0297Serialize and Deserialize Binary Tree[Go]({{< relref "/ChapterFour/0200~0299/0297.Serialize-and-Deserialize-Binary-Tree.md" >}})Hard55.4%
0301Remove Invalid Parentheses[Go]({{< relref "/ChapterFour/0300~0399/0301.Remove-Invalid-Parentheses.md" >}})Hard47.2%
0322Coin Change[Go]({{< relref "/ChapterFour/0300~0399/0322.Coin-Change.md" >}})Medium42.1%
0329Longest Increasing Path in a Matrix[Go]({{< relref "/ChapterFour/0300~0399/0329.Longest-Increasing-Path-in-a-Matrix.md" >}})Hard52.4%
0399Evaluate Division[Go]({{< relref "/ChapterFour/0300~0399/0399.Evaluate-Division.md" >}})Medium59.7%
0404Sum of Left Leaves[Go]({{< relref "/ChapterFour/0400~0499/0404.Sum-of-Left-Leaves.md" >}})Easy56.7%
0417Pacific Atlantic Water Flow[Go]({{< relref "/ChapterFour/0400~0499/0417.Pacific-Atlantic-Water-Flow.md" >}})Medium54.4%
0429N-ary Tree Level Order Traversal[Go]({{< relref "/ChapterFour/0400~0499/0429.N-ary-Tree-Level-Order-Traversal.md" >}})Medium70.7%
0433Minimum Genetic Mutation[Go]({{< relref "/ChapterFour/0400~0499/0433.Minimum-Genetic-Mutation.md" >}})Medium52.4%
0463Island Perimeter[Go]({{< relref "/ChapterFour/0400~0499/0463.Island-Perimeter.md" >}})Easy69.7%
0488Zuma Game[Go]({{< relref "/ChapterFour/0400~0499/0488.Zuma-Game.md" >}})Hard33.9%
0513Find Bottom Left Tree Value[Go]({{< relref "/ChapterFour/0500~0599/0513.Find-Bottom-Left-Tree-Value.md" >}})Medium66.9%
0515Find Largest Value in Each Tree Row[Go]({{< relref "/ChapterFour/0500~0599/0515.Find-Largest-Value-in-Each-Tree-Row.md" >}})MediumO(n)O(n)64.6%
0529Minesweeper[Go]({{< relref "/ChapterFour/0500~0599/0529.Minesweeper.md" >}})Medium65.7%
0530Minimum Absolute Difference in BST[Go]({{< relref "/ChapterFour/0500~0599/0530.Minimum-Absolute-Difference-in-BST.md" >}})Easy57.3%
054201 Matrix[Go]({{< relref "/ChapterFour/0500~0599/0542.01-Matrix.md" >}})MediumO(n)O(1)44.8%
0547Number of Provinces[Go]({{< relref "/ChapterFour/0500~0599/0547.Number-of-Provinces.md" >}})Medium63.8%
0559Maximum Depth of N-ary Tree[Go]({{< relref "/ChapterFour/0500~0599/0559.Maximum-Depth-of-N-ary-Tree.md" >}})Easy71.7%
0617Merge Two Binary Trees[Go]({{< relref "/ChapterFour/0600~0699/0617.Merge-Two-Binary-Trees.md" >}})Easy78.7%
0623Add One Row to Tree[Go]({{< relref "/ChapterFour/0600~0699/0623.Add-One-Row-to-Tree.md" >}})Medium59.5%
0637Average of Levels in Binary Tree[Go]({{< relref "/ChapterFour/0600~0699/0637.Average-of-Levels-in-Binary-Tree.md" >}})Easy71.7%
0653Two Sum IV - Input is a BST[Go]({{< relref "/ChapterFour/0600~0699/0653.Two-Sum-IV-Input-is-a-BST.md" >}})Easy61.0%
0662Maximum Width of Binary Tree[Go]({{< relref "/ChapterFour/0600~0699/0662.Maximum-Width-of-Binary-Tree.md" >}})Medium40.7%
0684Redundant Connection[Go]({{< relref "/ChapterFour/0600~0699/0684.Redundant-Connection.md" >}})Medium62.2%
0685Redundant Connection II[Go]({{< relref "/ChapterFour/0600~0699/0685.Redundant-Connection-II.md" >}})Hard34.1%
0690Employee Importance[Go]({{< relref "/ChapterFour/0600~0699/0690.Employee-Importance.md" >}})Medium65.6%
0695Max Area of Island[Go]({{< relref "/ChapterFour/0600~0699/0695.Max-Area-of-Island.md" >}})Medium71.8%
0721Accounts Merge[Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}})Medium56.3%
0733Flood Fill[Go]({{< relref "/ChapterFour/0700~0799/0733.Flood-Fill.md" >}})Easy62.0%
0752Open the Lock[Go]({{< relref "/ChapterFour/0700~0799/0752.Open-the-Lock.md" >}})Medium55.6%
0756Pyramid Transition Matrix[Go]({{< relref "/ChapterFour/0700~0799/0756.Pyramid-Transition-Matrix.md" >}})Medium52.7%
0765Couples Holding Hands[Go]({{< relref "/ChapterFour/0700~0799/0765.Couples-Holding-Hands.md" >}})Hard56.6%
0778Swim in Rising Water[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})Hard59.8%
0783Minimum Distance Between BST Nodes[Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}})Easy59.3%
0785Is Graph Bipartite?[Go]({{< relref "/ChapterFour/0700~0799/0785.Is-Graph-Bipartite.md" >}})Medium53.1%
0802Find Eventual Safe States[Go]({{< relref "/ChapterFour/0800~0899/0802.Find-Eventual-Safe-States.md" >}})Medium56.6%
0815Bus Routes[Go]({{< relref "/ChapterFour/0800~0899/0815.Bus-Routes.md" >}})Hard45.6%
0839Similar String Groups[Go]({{< relref "/ChapterFour/0800~0899/0839.Similar-String-Groups.md" >}})Hard48.0%
0841Keys and Rooms[Go]({{< relref "/ChapterFour/0800~0899/0841.Keys-and-Rooms.md" >}})Medium71.5%
0863All Nodes Distance K in Binary Tree[Go]({{< relref "/ChapterFour/0800~0899/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})Medium62.3%
0864Shortest Path to Get All Keys[Go]({{< relref "/ChapterFour/0800~0899/0864.Shortest-Path-to-Get-All-Keys.md" >}})Hard45.6%
0909Snakes and Ladders[Go]({{< relref "/ChapterFour/0900~0999/0909.Snakes-and-Ladders.md" >}})Medium45.1%
0924Minimize Malware Spread[Go]({{< relref "/ChapterFour/0900~0999/0924.Minimize-Malware-Spread.md" >}})Hard42.1%
0928Minimize Malware Spread II[Go]({{< relref "/ChapterFour/0900~0999/0928.Minimize-Malware-Spread-II.md" >}})Hard42.8%
0958Check Completeness of a Binary Tree[Go]({{< relref "/ChapterFour/0900~0999/0958.Check-Completeness-of-a-Binary-Tree.md" >}})Medium56.2%
0959Regions Cut By Slashes[Go]({{< relref "/ChapterFour/0900~0999/0959.Regions-Cut-By-Slashes.md" >}})Medium69.1%
0987Vertical Order Traversal of a Binary Tree[Go]({{< relref "/ChapterFour/0900~0999/0987.Vertical-Order-Traversal-of-a-Binary-Tree.md" >}})Hard45.1%
0993Cousins in Binary Tree[Go]({{< relref "/ChapterFour/0900~0999/0993.Cousins-in-Binary-Tree.md" >}})EasyO(n)O(1)54.6%
1020Number of Enclaves[Go]({{< relref "/ChapterFour/1000~1099/1020.Number-of-Enclaves.md" >}})Medium65.6%
1034Coloring A Border[Go]({{< relref "/ChapterFour/1000~1099/1034.Coloring-A-Border.md" >}})Medium49.2%
1091Shortest Path in Binary Matrix[Go]({{< relref "/ChapterFour/1000~1099/1091.Shortest-Path-in-Binary-Matrix.md" >}})Medium44.7%
1123Lowest Common Ancestor of Deepest Leaves[Go]({{< relref "/ChapterFour/1100~1199/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}})Medium70.9%
1202Smallest String With Swaps[Go]({{< relref "/ChapterFour/1200~1299/1202.Smallest-String-With-Swaps.md" >}})Medium57.7%
1203Sort Items by Groups Respecting Dependencies[Go]({{< relref "/ChapterFour/1200~1299/1203.Sort-Items-by-Groups-Respecting-Dependencies.md" >}})Hard51.2%
1254Number of Closed Islands[Go]({{< relref "/ChapterFour/1200~1299/1254.Number-of-Closed-Islands.md" >}})Medium66.9%
1293Shortest Path in a Grid with Obstacles Elimination[Go]({{< relref "/ChapterFour/1200~1299/1293.Shortest-Path-in-a-Grid-with-Obstacles-Elimination.md" >}})Hard45.3%
1302Deepest Leaves Sum[Go]({{< relref "/ChapterFour/1300~1399/1302.Deepest-Leaves-Sum.md" >}})Medium86.6%
1306Jump Game III[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})Medium63.5%
1319Number of Operations to Make Network Connected[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})Medium62.1%
1609Even Odd Tree[Go]({{< relref "/ChapterFour/1600~1699/1609.Even-Odd-Tree.md" >}})Medium54.4%
1631Path With Minimum Effort[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})Medium55.7%
1654Minimum Jumps to Reach Home[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})Medium29.1%
------------------------------------------------------------------------------------------------------------------------------------------------

<div style="display: flex;justify-content: space-between;align-items: center;"> <p><a href="https://books.halfrost.com/leetcode/ChapterTwo/Depth_First_Search/">⬅️上一页</a></p> <p><a href="https://books.halfrost.com/leetcode/ChapterTwo/Binary_Search/">下一页➡️</a></p> </div>