← back
Breadth-First Search
200 questions · 0 seen
All Breadth-First Search problems
Actions
⊣ Practice
Breadth-First Search
⊣ Quiz
Breadth-First Search
Problems
⊣ 100 Same Tree
Easy
⊣ 101 Symmetric Tree
Easy
⊣ 102 Binary Tree Level Order Traversal
Medium
⊣ 103 Binary Tree Zigzag Level Order Traversal
Medium
⊣ 104 Maximum Depth of Binary Tree
Easy
⊣ 107 Binary Tree Level Order Traversal II
Medium
⊣ 111 Minimum Depth of Binary Tree
Easy
⊣ 112 Path Sum
Easy
⊣ 116 Populating Next Right Pointers in Each Node
Medium
⊣ 117 Populating Next Right Pointers in Each Node II
Medium
⊣ 126 Word Ladder II
Hard
⊣ 127 Word Ladder
Hard
⊣ 130 Surrounded Regions
Medium
⊣ 133 Clone Graph
Medium
⊣ 199 Binary Tree Right Side View
Medium
⊣ 200 Number of Islands
Medium
⊣ 207 Course Schedule
Medium
⊣ 210 Course Schedule II
Medium
⊣ 226 Invert Binary Tree
Easy
⊣ 279 Perfect Squares
Medium
⊣ 297 Serialize and Deserialize Binary Tree
Hard
⊣ 301 Remove Invalid Parentheses
Hard
⊣ 310 Minimum Height Trees
Medium
⊣ 322 Coin Change
Medium
⊣ 329 Longest Increasing Path in a Matrix
Hard
⊣ 365 Water and Jug Problem
Medium
⊣ 399 Evaluate Division
Medium
⊣ 404 Sum of Left Leaves
Easy
⊣ 407 Trapping Rain Water II
Hard
⊣ 417 Pacific Atlantic Water Flow
Medium
⊣ 429 N-ary Tree Level Order Traversal
Medium
⊣ 433 Minimum Genetic Mutation
Medium
⊣ 449 Serialize and Deserialize BST
Medium
⊣ 463 Island Perimeter
Easy
⊣ 488 Zuma Game
Hard
⊣ 513 Find Bottom Left Tree Value
Medium
⊣ 514 Freedom Trail
Hard
⊣ 515 Find Largest Value in Each Tree Row
Medium
⊣ 529 Minesweeper
Medium
⊣ 530 Minimum Absolute Difference in BST
Easy
⊣ 542 01 Matrix
Medium
⊣ 547 Number of Provinces
Medium
⊣ 559 Maximum Depth of N-ary Tree
Easy
⊣ 617 Merge Two Binary Trees
Easy
⊣ 623 Add One Row to Tree
Medium
⊣ 637 Average of Levels in Binary Tree
Easy
⊣ 653 Two Sum IV - Input is a BST
Easy
⊣ 655 Print Binary Tree
Medium
⊣ 662 Maximum Width of Binary Tree
Medium
⊣ 672 Bulb Switcher II
Medium
⊣ 675 Cut Off Trees for Golf Event
Hard
⊣ 684 Redundant Connection
Medium
⊣ 685 Redundant Connection II
Hard
⊣ 690 Employee Importance
Medium
⊣ 695 Max Area of Island
Medium
⊣ 721 Accounts Merge
Medium
⊣ 733 Flood Fill
Easy
⊣ 743 Network Delay Time
Medium
⊣ 749 Contain Virus
Hard
⊣ 752 Open the Lock
Medium
⊣ 765 Couples Holding Hands
Hard
⊣ 773 Sliding Puzzle
Hard
⊣ 778 Swim in Rising Water
Hard
⊣ 783 Minimum Distance Between BST Nodes
Easy
⊣ 785 Is Graph Bipartite?
Medium
⊣ 787 Cheapest Flights Within K Stops
Medium
⊣ 797 All Paths From Source to Target
Medium
⊣ 802 Find Eventual Safe States
Medium
⊣ 815 Bus Routes
Hard
⊣ 827 Making A Large Island
Hard
⊣ 839 Similar String Groups
Hard
⊣ 841 Keys and Rooms
Medium
⊣ 847 Shortest Path Visiting All Nodes
Hard
⊣ 854 K-Similar Strings
Hard
⊣ 863 All Nodes Distance K in Binary Tree
Medium
⊣ 864 Shortest Path to Get All Keys
Hard
⊣ 865 Smallest Subtree with all the Deepest Nodes
Medium
⊣ 886 Possible Bipartition
Medium
⊣ 909 Snakes and Ladders
Medium
⊣ 919 Complete Binary Tree Inserter
Medium
⊣ 924 Minimize Malware Spread
Hard
⊣ 928 Minimize Malware Spread II
Hard
⊣ 934 Shortest Bridge
Medium
⊣ 958 Check Completeness of a Binary Tree
Medium
⊣ 959 Regions Cut By Slashes
Medium
⊣ 965 Univalued Binary Tree
Easy
⊣ 967 Numbers With Same Consecutive Differences
Medium
⊣ 987 Vertical Order Traversal of a Binary Tree
Hard
⊣ 993 Cousins in Binary Tree
Easy
⊣ 994 Rotting Oranges
Medium
⊣ 1020 Number of Enclaves
Medium
⊣ 1034 Coloring A Border
Medium
⊣ 1036 Escape a Large Maze
Hard
⊣ 1042 Flower Planting With No Adjacent
Medium
⊣ 1091 Shortest Path in Binary Matrix
Medium
⊣ 1096 Brace Expansion II
Hard
⊣ 1123 Lowest Common Ancestor of Deepest Leaves
Medium
⊣ 1129 Shortest Path with Alternating Colors
Medium
⊣ 1161 Maximum Level Sum of a Binary Tree
Medium
⊣ 1162 As Far from Land as Possible
Medium
⊣ 1202 Smallest String With Swaps
Medium
⊣ 1203 Sort Items by Groups Respecting Dependencies
Hard
⊣ 1210 Minimum Moves to Reach Target with Rotations
Hard
⊣ 1254 Number of Closed Islands
Medium
⊣ 1261 Find Elements in a Contaminated Binary Tree
Medium
⊣ 1263 Minimum Moves to Move a Box to Their Target Location
Hard
⊣ 1267 Count Servers that Communicate
Medium
⊣ 1284 Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
Hard
⊣ 1293 Shortest Path in a Grid with Obstacles Elimination
Hard
⊣ 1298 Maximum Candies You Can Get from Boxes
Hard
⊣ 1302 Deepest Leaves Sum
Medium
⊣ 1306 Jump Game III
Medium
⊣ 1311 Get Watched Videos by Your Friends
Medium
⊣ 1315 Sum of Nodes with Even-Valued Grandparent
Medium
⊣ 1319 Number of Operations to Make Network Connected
Medium
⊣ 1345 Jump Game IV
Hard
⊣ 1361 Validate Binary Tree Nodes
Medium
⊣ 1368 Minimum Cost to Make at Least One Valid Path in a Grid
Hard
⊣ 1376 Time Needed to Inform All Employees
Medium
⊣ 1377 Frog Position After T Seconds
Hard
⊣ 1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree
Easy
⊣ 1391 Check if There is a Valid Path in a Grid
Medium
⊣ 1443 Minimum Time to Collect All Apples in a Tree
Medium
⊣ 1448 Count Good Nodes in Binary Tree
Medium
⊣ 1457 Pseudo-Palindromic Paths in a Binary Tree
Medium
⊣ 1462 Course Schedule IV
Medium
⊣ 1466 Reorder Routes to Make All Paths Lead to the City Zero
Medium
⊣ 1483 Kth Ancestor of a Tree Node
Hard
⊣ 1519 Number of Nodes in the Sub-Tree With the Same Label (PRO)
Medium
⊣ 1559 Detect Cycles in 2D Grid
Medium
⊣ 1568 Minimum Number of Days to Disconnect Island
Hard
⊣ 1609 Even Odd Tree
Medium
⊣ 1625 Lexicographically Smallest String After Applying Operations
Medium
⊣ 1631 Path With Minimum Effort
Medium
⊣ 1654 Minimum Jumps to Reach Home
Medium
⊣ 1765 Map of Highest Peak
Medium
⊣ 1905 Count Sub Islands
Medium
⊣ 1926 Nearest Exit from Entrance in Maze
Medium
⊣ 1970 Last Day Where You Can Still Cross (PRO)
Hard
⊣ 1971 Find if Path Exists in Graph
Easy
⊣ 1992 Find All Groups of Farmland (PRO)
Medium
⊣ 1993 Operations on Tree
Medium
⊣ 2039 The Time When the Network Becomes Idle
Medium
⊣ 2045 Second Minimum Time to Reach Destination
Hard
⊣ 2059 Minimum Operations to Convert Number
Medium
⊣ 2092 Find All People With Secret
Hard
⊣ 2101 Detonate the Maximum Bombs
Medium
⊣ 2146 K Highest Ranked Items Within a Price Range
Medium
⊣ 2192 All Ancestors of a Node in a Directed Acyclic Graph
Medium
⊣ 2258 Escape the Spreading Fire
Hard
⊣ 2290 Minimum Obstacle Removal to Reach Corner
Hard
⊣ 2316 Count Unreachable Pairs of Nodes in an Undirected Graph
Medium
⊣ 2328 Number of Increasing Paths in a Grid
Hard
⊣ 2360 Longest Cycle in a Graph
Hard
⊣ 2368 Reachable Nodes With Restrictions
Medium
⊣ 2385 Amount of Time for Binary Tree to Be Infected
Medium
⊣ 2415 Reverse Odd Levels of Binary Tree
Medium
⊣ 2458 Height of Binary Tree After Subtree Removal Queries
Hard
⊣ 2467 Most Profitable Path in a Tree
Medium
⊣ 2471 Minimum Number of Operations to Sort a Binary Tree by Level
Medium
⊣ 2477 Minimum Fuel Cost to Report to the Capital
Medium
⊣ 2492 Minimum Score of a Path Between Two Cities
Medium
⊣ 2493 Divide Nodes Into the Maximum Number of Groups
Hard
⊣ 2503 Maximum Number of Points From Grid Queries
Hard
⊣ 2556 Disconnect Path in a Binary Matrix by at Most One Flip
Medium
⊣ 2577 Minimum Time to Visit a Cell In a Grid
Hard
⊣ 2583 Kth Largest Sum in a Binary Tree
Medium
⊣ 2596 Check Knight Tour Configuration
Medium
⊣ 2608 Shortest Cycle in a Graph
Hard
⊣ 2612 Minimum Reverse Operations
Hard
⊣ 2617 Minimum Number of Visited Cells in a Grid
Hard
⊣ 2641 Cousins in Binary Tree II
Medium
⊣ 2658 Maximum Number of Fish in a Grid
Medium
⊣ 2685 Count the Number of Complete Components
Medium
⊣ 2812 Find the Safest Path in a Grid
Medium
⊣ 2858 Minimum Edge Reversals So Every Node Is Reachable
Hard
⊣ 2998 Minimum Number of Operations to Make X and Y Equal
Medium
⊣ 3015 Count the Number of Houses at a Certain Distance I
Medium
⊣ 3123 Find Edges in Shortest Paths
Hard
⊣ 3203 Find Minimum Diameter After Merging Two Trees
Hard
⊣ 3235 Check if the Rectangle Corner Is Reachable
Hard
⊣ 3243 Shortest Distance After Road Addition Queries I
Medium
⊣ 3283 Maximum Number of Moves to Kill All Pawns
Hard
⊣ 3286 Find a Safe Walk Through a Grid
Medium
⊣ 3310 Remove Methods From Project
Medium
⊣ 3372 Maximize the Number of Target Nodes After Connecting Trees I
Medium
⊣ 3373 Maximize the Number of Target Nodes After Connecting Trees II
Hard
⊣ 3387 Maximize Amount After Two Days of Conversions
Medium
⊣ 3419 Minimize the Maximum Edge Weight of Graph
Medium
⊣ 3493 Properties Graph
Medium
⊣ 3528 Unit Conversion I
Medium
⊣ 3552 Grid Teleportation Traversal
Medium
⊣ 3568 Minimum Moves to Clean the Classroom
Medium
⊣ 3607 Power Grid Maintenance
Medium
⊣ 3619 Count Islands With Total Value Divisible by K
Medium
⊣ 3629 Minimum Jumps to Reach End via Prime Teleportation
Medium
⊣ 3666 Minimum Operations to Equalize Binary String
Hard
⊣ 3690 Split and Merge Array Transformation
Medium
⊣ 3710 Maximum Partition Factor
Hard
⊣ 3820 Pythagorean Distance Nodes in a Tree
Medium