Tag: breadth-first-search
- 01 Matrix
- Accounts Merge
- Add One Row to Tree
- Alien Dictionary
- All Ancestors of a Node in a Directed Acyclic Graph
- All Nodes Distance K in Binary Tree
- All Paths From Source to Target
- Amount of Time for Binary Tree to Be Infected
- Apply Substitutions
- As Far from Land as Possible
- Average of Levels in Binary Tree
- Binary Tree Level Order Traversal II
- Binary Tree Level Order Traversal
- Binary Tree Right Side View
- Binary Tree Vertical Order Traversal
- Binary Tree Zigzag Level Order Traversal
- Brace Expansion II
- Brace Expansion
- Bulb Switcher II
- Bus Routes
- Cheapest Flights Within K Stops
- Check Completeness of a Binary Tree
- Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
- Check if the Rectangle Corner Is Reachable
- Check if There is a Valid Path in a Grid
- Check Knight Tour Configuration
- Clone Binary Tree With Random Pointer
- Clone Graph
- Clone N-ary Tree
- Closest Leaf in a Binary Tree
- Closest Node to Path in Tree
- Coin Change
- Coloring A Border
- Complete Binary Tree Inserter
- Contain Virus
- Correct a Binary Tree
- Count Good Nodes in Binary Tree
- Count Servers that Communicate
- Count Sub Islands
- Count the Number of Complete Components
- Count the Number of Houses at a Certain Distance I
- Count Unreachable Pairs of Nodes in an Undirected Graph
- Couples Holding Hands
- Course Schedule II
- Course Schedule IV
- Course Schedule
- Cousins in Binary Tree II
- Cousins in Binary Tree
- Cut Off Trees for Golf Event
- Deepest Leaves Sum
- Delete Tree Nodes
- Detect Cycles in 2D Grid
- Detonate the Maximum Bombs
- Disconnect Path in a Binary Matrix by at Most One Flip
- Distance to a Cycle in Undirected Graph
- Divide Nodes Into the Maximum Number of Groups
- Employee Importance
- Encode N-ary Tree to Binary Tree
- Escape a Large Maze
- Escape the Spreading Fire
- Evaluate Division
- Even Odd Tree
- Find a Corresponding Node of a Binary Tree in a Clone of That Tree
- Find a Safe Walk Through a Grid
- Find All Groups of Farmland
- Find All People With Secret
- Find All The Lonely Nodes
- Find Bottom Left Tree Value
- Find Distance in a Binary Tree
- Find Edges in Shortest Paths
- Find Elements in a Contaminated Binary Tree
- Find Eventual Safe States
- Find if Path Exists in Graph
- Find Largest Value in Each Tree Row
- Find Minimum Diameter After Merging Two Trees
- Find Nearest Right Node in Binary Tree
- Find the Level of Tree with Minimum Sum
- Find the Safest Path in a Grid
- Flood Fill
- Flower Planting With No Adjacent
- Freedom Trail
- Frog Position After T Seconds
- Get Watched Videos by Your Friends
- Graph Valid Tree
- Height of Binary Tree After Subtree Removal Queries
- Height of Special Binary Tree
- Invert Binary Tree
- Is Graph Bipartite?
- Island Perimeter
- Jump Game III
- Jump Game IV
- K Highest Ranked Items Within a Price Range
- K-Similar Strings
- Keys and Rooms
- Kill Process
- Kth Ancestor of a Tree Node
- Kth Largest Sum in a Binary Tree
- Last Day Where You Can Still Cross
- Lexicographically Smallest String After Applying Operations
- Longest Cycle in a Graph
- Longest Increasing Path in a Matrix
- Lowest Common Ancestor of Deepest Leaves
- Making A Large Island
- Map of Highest Peak
- Max Area of Island
- Maximize Amount After Two Days of Conversions
- Maximize the Number of Target Nodes After Connecting Trees I
- Maximize the Number of Target Nodes After Connecting Trees II
- Maximum Candies You Can Get from Boxes
- Maximum Depth of Binary Tree
- Maximum Depth of N-ary Tree
- Maximum Hamming Distances
- Maximum Level Sum of a Binary Tree
- Maximum Number of Fish in a Grid
- Maximum Number of Moves to Kill All Pawns
- Maximum Number of Points From Grid Queries
- Maximum Width of Binary Tree
- Merge Two Binary Trees
- Minesweeper
- Minimize Malware Spread II
- Minimize Malware Spread
- Minimize the Maximum Edge Weight of Graph
- Minimum Absolute Difference in BST
- Minimum Cost to Make at Least One Valid Path in a Grid
- Minimum Depth of Binary Tree
- Minimum Distance Between BST Nodes
- Minimum Edge Reversals So Every Node Is Reachable
- Minimum Fuel Cost to Report to the Capital
- Minimum Genetic Mutation
- Minimum Height Trees
- Minimum Jumps to Reach Home
- Minimum Knight Moves
- Minimum Moves to Move a Box to Their Target Location
- Minimum Moves to Reach Target with Rotations
- Minimum Moves to Spread Stones Over Grid
- Minimum Number of Days to Disconnect Island
- Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
- Minimum Number of Operations to Make X and Y Equal
- Minimum Number of Operations to Sort a Binary Tree by Level
- Minimum Number of Visited Cells in a Grid
- Minimum Obstacle Removal to Reach Corner
- Minimum Operations to Convert Number
- Minimum Path Cost in a Hidden Grid
- Minimum Reverse Operations
- Minimum Runes to Add to Cast Spell
- Minimum Score of a Path Between Two Cities
- Minimum Time Takes to Reach Destination Without Drowning
- Minimum Time to Collect All Apples in a Tree
- Minimum Time to Visit a Cell In a Grid
- Most Profitable Path in a Tree
- N-ary Tree Level Order Traversal
- Nearest Exit from Entrance in Maze
- Nested List Weight Sum II
- Nested List Weight Sum
- Network Delay Time
- Number of Closed Islands
- Number of Connected Components in an Undirected Graph
- Number of Distinct Islands II
- Number of Distinct Islands
- Number of Enclaves
- Number of Increasing Paths in a Grid
- Number of Islands
- Number of Nodes in the Sub-Tree With the Same Label
- Number of Nodes With Value One
- Number of Operations to Make Network Connected
- Number of Provinces
- Numbers With Same Consecutive Differences
- Open the Lock
- Operations on Tree
- Pacific Atlantic Water Flow
- Path Sum
- Path With Maximum Minimum Value
- Path With Minimum Effort
- Perfect Squares
- Populating Next Right Pointers in Each Node II
- Populating Next Right Pointers in Each Node
- Possible Bipartition
- Print Binary Tree
- Properties Graph
- Pseudo-Palindromic Paths in a Binary Tree
- Pyramid Transition Matrix
- Reachable Nodes With Restrictions
- Redundant Connection II
- Redundant Connection
- Regions Cut By Slashes
- Remove All Ones With Row and Column Flips II
- Remove Invalid Parentheses
- Remove Methods From Project
- Reorder Routes to Make All Paths Lead to the City Zero
- Reverse Odd Levels of Binary Tree
- Rotting Oranges
- Same Tree
- Second Minimum Time to Reach Destination
- Sentence Similarity II
- Serialize and Deserialize Binary Tree
- Serialize and Deserialize BST
- Serialize and Deserialize N-ary Tree
- Shortest Bridge
- Shortest Cycle in a Graph
- Shortest Distance After Road Addition Queries I
- Shortest Distance from All Buildings
- Shortest Path in a Grid with Obstacles Elimination
- Shortest Path in a Hidden Grid
- Shortest Path in Binary Matrix
- Shortest Path to Get All Keys
- Shortest Path to Get Food
- Shortest Path Visiting All Nodes
- Shortest Path with Alternating Colors
- Similar String Groups
- Sliding Puzzle
- Smallest Common Region
- Smallest Rectangle Enclosing Black Pixels
- Smallest String With Swaps
- Smallest Subtree with all the Deepest Nodes
- Snakes and Ladders
- Sort Items by Groups Respecting Dependencies
- Stepping Numbers
- Sum of Left Leaves
- Sum of Nodes with Even-Valued Grandparent
- Sum of Remoteness of All Cells
- Surrounded Regions
- Swim in Rising Water
- Symmetric Tree
- The Maze II
- The Maze III
- The Maze
- The Time When the Network Becomes Idle
- Time Needed to Inform All Employees
- Trapping Rain Water II
- Tree Diameter
- Two Sum IV - Input is a BST
- Univalued Binary Tree
- Validate Binary Tree Nodes
- Vertical Order Traversal of a Binary Tree
- Walls and Gates
- Water and Jug Problem
- Web Crawler Multithreaded
- Web Crawler
- Word Ladder II
- Word Ladder
- Zuma Game