Breadth-First Search Interview Questions

Level-order exploration and shortest unweighted paths.

115 problems

#Title
102Binary Tree Level Order Traversal
103Binary Tree Zigzag Level Order Traversal
107Binary Tree Level Order Traversal II
117Populating Next Right Pointers in Each Node II
127Word Ladder
130Surrounded Regions
133Clone Graph
207Course Schedule
210Course Schedule II
261Graph Valid Tree
269Alien Dictionary
286Walls and Gates
310Minimum Height Trees
317Shortest Distance from All Buildings
433Minimum Genetic Mutation
444Sequence Reconstruction
490The Maze
499The Maze III
505The Maze II
54201 Matrix
666Path Sum IV
675Cut Off Trees for Golf Event
742Closest Leaf in a Binary Tree
743Network Delay Time
752Open the Lock
773Sliding Puzzle
787Cheapest Flights Within K Stops
815Bus Routes
854K-Similar Strings
864Shortest Path to Get All Keys
882Reachable Nodes In Subdivided Graph
886Possible Bipartition
913Cat and Mouse
934Shortest Bridge
967Numbers With Same Consecutive Differences
994Rotting Oranges
1034Coloring A Border
1036Escape a Large Maze
1091Shortest Path in Binary Matrix
1102Path With Maximum Minimum Value
1129Shortest Path with Alternating Colors
1136Parallel Courses
1161Maximum Level Sum of a Binary Tree
1162As Far from Land as Possible
1203Sort Items by Groups Respecting Dependencies
1210Minimum Moves to Reach Target with Rotations
1215Stepping Numbers
1245Tree Diameter
1263Minimum Moves to Move a Box to Their Target Location
1284Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
1291Sequential Digits
1293Shortest Path in a Grid with Obstacles Elimination
1298Maximum Candies You Can Get from Boxes
1302Deepest Leaves Sum
1306Jump Game III
1311Get Watched Videos by Your Friends
1345Jump Game IV
1368Minimum Cost to Make at Least One Valid Path in a Grid
1514Path with Maximum Probability
1602Find Nearest Right Node in Binary Tree
1609Even Odd Tree
1625Lexicographically Smallest String After Applying Operations
1654Minimum Jumps to Reach Home
1660Correct a Binary Tree
1728Cat and Mouse II
1730Shortest Path to Get Food
1765Map of Highest Peak
1926Nearest Exit from Entrance in Maze
1928Minimum Cost to Reach Destination in Time
2039The Time When the Network Becomes Idle
2045Second Minimum Time to Reach Destination
2050Parallel Courses III
2059Minimum Operations to Convert Number
2115Find All Possible Recipes from Given Supplies
2146K Highest Ranked Items Within a Price Range
2258Escape the Spreading Fire
2290Minimum Obstacle Removal to Reach Corner
2316Count Unreachable Pairs of Nodes in an Undirected Graph
2368Reachable Nodes With Restrictions
2415Reverse Odd Levels of Binary Tree
2471Minimum Number of Operations to Sort a Binary Tree by Level
2492Minimum Score of a Path Between Two Cities
2493Divide Nodes Into the Maximum Number of Groups
2503Maximum Number of Points From Grid Queries
2577Minimum Time to Visit a Cell In a Grid
2583Kth Largest Sum in a Binary Tree
2603Collect Coins in a Tree
2612Minimum Reverse Operations
2617Minimum Number of Visited Cells in a Grid
2641Cousins in Binary Tree II
2658Maximum Number of Fish in a Grid
2685Count the Number of Complete Components
2709Greatest Common Divisor Traversal
2812Find the Safest Path in a Grid
2814Minimum Time Takes to Reach Destination Without Drowning
2852Sum of Remoteness of All Cells
3157Find the Level of Tree with Minimum Sum
3286Find a Safe Walk Through a Grid
3373Maximize the Number of Target Nodes After Connecting Trees II
3528Unit Conversion I
3535Unit Conversion II
3552Grid Teleportation Traversal
3568Minimum Moves to Clean the Classroom
3619Count Islands With Total Value Divisible by K
3629Minimum Jumps to Reach End via Prime Teleportation
3690Split and Merge Array Transformation
3695Maximize Alternating Sum Using Swaps
3786Total Sum of Interaction Cost in Tree Groups
3787Find Diameter Endpoints of a Tree
3820Pythagorean Distance Nodes in a Tree
3831Median of a Binary Search Tree Level
3902Zigzag Level Sum of Binary Tree
3905Multi Source Flood Fill
3923Minimum Generations to Target Point
3991Sort Array Using Prefix Reversals