Files
LeetCode-Go/website/content/ChapterTwo/Breadth_First_Search.md
2021-11-06 19:06:10 -07:00

10 KiB

title type weight
2.10 Breadth First Search docs 10

Breadth First Search

No. Title Solution Difficulty TimeComplexity SpaceComplexity Favorite Acceptance
0100 Same Tree [Go]({{< relref "/ChapterFour/0100~0199/0100.Same-Tree.md" >}}) Easy 54.9%
0101 Symmetric Tree [Go]({{< relref "/ChapterFour/0100~0199/0101.Symmetric-Tree.md" >}}) Easy O(n) O(1) 50.2%
0102 Binary Tree Level Order Traversal [Go]({{< relref "/ChapterFour/0100~0199/0102.Binary-Tree-Level-Order-Traversal.md" >}}) Medium O(n) O(1) 59.2%
0103 Binary Tree Zigzag Level Order Traversal [Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}}) Medium O(n) O(n) 52.1%
0104 Maximum Depth of Binary Tree [Go]({{< relref "/ChapterFour/0100~0199/0104.Maximum-Depth-of-Binary-Tree.md" >}}) Easy 70.2%
0107 Binary Tree Level Order Traversal II [Go]({{< relref "/ChapterFour/0100~0199/0107.Binary-Tree-Level-Order-Traversal-II.md" >}}) Medium O(n) O(1) 57.2%
0111 Minimum Depth of Binary Tree [Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}}) Easy O(n) O(1) 41.3%
0116 Populating Next Right Pointers in Each Node [Go]({{< relref "/ChapterFour/0100~0199/0116.Populating-Next-Right-Pointers-in-Each-Node.md" >}}) Medium 53.2%
0126 Word Ladder II [Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}}) Hard O(n) O(n^2) ❤️ 25.9%
0127 Word Ladder [Go]({{< relref "/ChapterFour/0100~0199/0127.Word-Ladder.md" >}}) Hard O(n) O(n) 33.8%
0130 Surrounded Regions [Go]({{< relref "/ChapterFour/0100~0199/0130.Surrounded-Regions.md" >}}) Medium 32.5%
0199 Binary Tree Right Side View [Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}}) Medium O(n) O(1) 58.2%
0200 Number of Islands [Go]({{< relref "/ChapterFour/0200~0299/0200.Number-of-Islands.md" >}}) Medium O(n^2) O(n^2) 52.0%
0207 Course Schedule [Go]({{< relref "/ChapterFour/0200~0299/0207.Course-Schedule.md" >}}) Medium O(n^2) O(n^2) 44.7%
0210 Course Schedule II [Go]({{< relref "/ChapterFour/0200~0299/0210.Course-Schedule-II.md" >}}) Medium O(n^2) O(n^2) 44.9%
0226 Invert Binary Tree [Go]({{< relref "/ChapterFour/0200~0299/0226.Invert-Binary-Tree.md" >}}) Easy 69.9%
0279 Perfect Squares [Go]({{< relref "/ChapterFour/0200~0299/0279.Perfect-Squares.md" >}}) Medium 51.1%
0297 Serialize and Deserialize Binary Tree [Go]({{< relref "/ChapterFour/0200~0299/0297.Serialize-and-Deserialize-Binary-Tree.md" >}}) Hard 52.2%
0301 Remove Invalid Parentheses [Go]({{< relref "/ChapterFour/0300~0399/0301.Remove-Invalid-Parentheses.md" >}}) Hard 46.0%
0322 Coin Change [Go]({{< relref "/ChapterFour/0300~0399/0322.Coin-Change.md" >}}) Medium 39.0%
0329 Longest Increasing Path in a Matrix [Go]({{< relref "/ChapterFour/0300~0399/0329.Longest-Increasing-Path-in-a-Matrix.md" >}}) Hard 48.3%
0399 Evaluate Division [Go]({{< relref "/ChapterFour/0300~0399/0399.Evaluate-Division.md" >}}) Medium 55.9%
0404 Sum of Left Leaves [Go]({{< relref "/ChapterFour/0400~0499/0404.Sum-of-Left-Leaves.md" >}}) Easy 54.2%
0417 Pacific Atlantic Water Flow [Go]({{< relref "/ChapterFour/0400~0499/0417.Pacific-Atlantic-Water-Flow.md" >}}) Medium 46.6%
0429 N-ary Tree Level Order Traversal [Go]({{< relref "/ChapterFour/0400~0499/0429.N-ary-Tree-Level-Order-Traversal.md" >}}) Medium 68.1%
0433 Minimum Genetic Mutation [Go]({{< relref "/ChapterFour/0400~0499/0433.Minimum-Genetic-Mutation.md" >}}) Medium 44.9%
0463 Island Perimeter [Go]({{< relref "/ChapterFour/0400~0499/0463.Island-Perimeter.md" >}}) Easy 68.3%
0513 Find Bottom Left Tree Value [Go]({{< relref "/ChapterFour/0500~0599/0513.Find-Bottom-Left-Tree-Value.md" >}}) Medium 64.1%
0515 Find Largest Value in Each Tree Row [Go]({{< relref "/ChapterFour/0500~0599/0515.Find-Largest-Value-in-Each-Tree-Row.md" >}}) Medium O(n) O(n) 63.7%
0529 Minesweeper [Go]({{< relref "/ChapterFour/0500~0599/0529.Minesweeper.md" >}}) Medium 63.5%
0530 Minimum Absolute Difference in BST [Go]({{< relref "/ChapterFour/0500~0599/0530.Minimum-Absolute-Difference-in-BST.md" >}}) Easy 55.7%
0542 01 Matrix [Go]({{< relref "/ChapterFour/0500~0599/0542.01-Matrix.md" >}}) Medium O(n) O(1) 43.2%
0547 Number of Provinces [Go]({{< relref "/ChapterFour/0500~0599/0547.Number-of-Provinces.md" >}}) Medium 62.2%
0617 Merge Two Binary Trees [Go]({{< relref "/ChapterFour/0600~0699/0617.Merge-Two-Binary-Trees.md" >}}) Easy 76.9%
0623 Add One Row to Tree [Go]({{< relref "/ChapterFour/0600~0699/0623.Add-One-Row-to-Tree.md" >}}) Medium 53.5%
0637 Average of Levels in Binary Tree [Go]({{< relref "/ChapterFour/0600~0699/0637.Average-of-Levels-in-Binary-Tree.md" >}}) Easy 67.4%
0653 Two Sum IV - Input is a BST [Go]({{< relref "/ChapterFour/0600~0699/0653.Two-Sum-IV-Input-is-a-BST.md" >}}) Easy 58.0%
0662 Maximum Width of Binary Tree [Go]({{< relref "/ChapterFour/0600~0699/0662.Maximum-Width-of-Binary-Tree.md" >}}) Medium 39.6%
0684 Redundant Connection [Go]({{< relref "/ChapterFour/0600~0699/0684.Redundant-Connection.md" >}}) Medium 60.5%
0685 Redundant Connection II [Go]({{< relref "/ChapterFour/0600~0699/0685.Redundant-Connection-II.md" >}}) Hard 33.4%
0690 Employee Importance [Go]({{< relref "/ChapterFour/0600~0699/0690.Employee-Importance.md" >}}) Medium 61.7%
0695 Max Area of Island [Go]({{< relref "/ChapterFour/0600~0699/0695.Max-Area-of-Island.md" >}}) Medium 68.1%
0721 Accounts Merge [Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}}) Medium 54.2%
0733 Flood Fill [Go]({{< relref "/ChapterFour/0700~0799/0733.Flood-Fill.md" >}}) Easy 56.9%
0752 Open the Lock [Go]({{< relref "/ChapterFour/0700~0799/0752.Open-the-Lock.md" >}}) Medium 55.0%
0756 Pyramid Transition Matrix [Go]({{< relref "/ChapterFour/0700~0799/0756.Pyramid-Transition-Matrix.md" >}}) Medium 55.5%
0765 Couples Holding Hands [Go]({{< relref "/ChapterFour/0700~0799/0765.Couples-Holding-Hands.md" >}}) Hard 56.1%
0778 Swim in Rising Water [Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}}) Hard 58.1%
0783 Minimum Distance Between BST Nodes [Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}}) Easy 55.3%
0785 Is Graph Bipartite? [Go]({{< relref "/ChapterFour/0700~0799/0785.Is-Graph-Bipartite.md" >}}) Medium 49.6%
0802 Find Eventual Safe States [Go]({{< relref "/ChapterFour/0800~0899/0802.Find-Eventual-Safe-States.md" >}}) Medium 51.3%
0815 Bus Routes [Go]({{< relref "/ChapterFour/0800~0899/0815.Bus-Routes.md" >}}) Hard 44.6%
0839 Similar String Groups [Go]({{< relref "/ChapterFour/0800~0899/0839.Similar-String-Groups.md" >}}) Hard 44.1%
0841 Keys and Rooms [Go]({{< relref "/ChapterFour/0800~0899/0841.Keys-and-Rooms.md" >}}) Medium 67.7%
0863 All Nodes Distance K in Binary Tree [Go]({{< relref "/ChapterFour/0800~0899/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}}) Medium 59.8%
0864 Shortest Path to Get All Keys [Go]({{< relref "/ChapterFour/0800~0899/0864.Shortest-Path-to-Get-All-Keys.md" >}}) Hard 43.5%
0909 Snakes and Ladders [Go]({{< relref "/ChapterFour/0900~0999/0909.Snakes-and-Ladders.md" >}}) Medium 39.7%
0924 Minimize Malware Spread [Go]({{< relref "/ChapterFour/0900~0999/0924.Minimize-Malware-Spread.md" >}}) Hard 41.8%
0928 Minimize Malware Spread II [Go]({{< relref "/ChapterFour/0900~0999/0928.Minimize-Malware-Spread-II.md" >}}) Hard 41.8%
0958 Check Completeness of a Binary Tree [Go]({{< relref "/ChapterFour/0900~0999/0958.Check-Completeness-of-a-Binary-Tree.md" >}}) Medium 52.9%
0959 Regions Cut By Slashes [Go]({{< relref "/ChapterFour/0900~0999/0959.Regions-Cut-By-Slashes.md" >}}) Medium 68.3%
0987 Vertical Order Traversal of a Binary Tree [Go]({{< relref "/ChapterFour/0900~0999/0987.Vertical-Order-Traversal-of-a-Binary-Tree.md" >}}) Hard 39.9%
0993 Cousins in Binary Tree [Go]({{< relref "/ChapterFour/0900~0999/0993.Cousins-in-Binary-Tree.md" >}}) Easy O(n) O(1) 53.6%
1020 Number of Enclaves [Go]({{< relref "/ChapterFour/1000~1099/1020.Number-of-Enclaves.md" >}}) Medium 60.8%
1091 Shortest Path in Binary Matrix [Go]({{< relref "/ChapterFour/1000~1099/1091.Shortest-Path-in-Binary-Matrix.md" >}}) Medium 41.3%
1123 Lowest Common Ancestor of Deepest Leaves [Go]({{< relref "/ChapterFour/1100~1199/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}}) Medium 69.1%
1202 Smallest String With Swaps [Go]({{< relref "/ChapterFour/1200~1299/1202.Smallest-String-With-Swaps.md" >}}) Medium 51.0%
1203 Sort Items by Groups Respecting Dependencies [Go]({{< relref "/ChapterFour/1200~1299/1203.Sort-Items-by-Groups-Respecting-Dependencies.md" >}}) Hard 49.0%
1254 Number of Closed Islands [Go]({{< relref "/ChapterFour/1200~1299/1254.Number-of-Closed-Islands.md" >}}) Medium 62.7%
1302 Deepest Leaves Sum [Go]({{< relref "/ChapterFour/1300~1399/1302.Deepest-Leaves-Sum.md" >}}) Medium 85.6%
1306 Jump Game III [Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}}) Medium 61.6%
1319 Number of Operations to Make Network Connected [Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}}) Medium 56.3%
1631 Path With Minimum Effort [Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}}) Medium 51.0%
1654 Minimum Jumps to Reach Home [Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}}) Medium 25.7%
------------ ------------------------------------------------------- ------- ---------------- --------------- ------------- ------------- -------------