Breadth First Search [BFS]¶
How To: Breadth First Search [BFS]
Binary tree level order traversal
Binary tree zigzag level order traversal
Binary tree level order traversal II
Populating next right pointers in each node II
Word ladder
Surrounded regions
Clone graph [Hash table and BFS]
Course schedule [Topological Sort]
Course schedule II [Topological Sort]
Graph valid tree
Alien dictionary [Topological Sort, DFS, BFS]
Walls and gates
Minimum height trees
Shortest distance from all buildings
Minimum genetic mutation
Sequence reconstruction [Topological Sort]
The maze
The maze III
The maze II
01 matrix [DP]
Path sum IV [Topological Sort]
Cut off trees for golf event [A* Search Algorithm]
Closest Leaf in a Binary Tree
Network delay time [DFS, Dijkstra’s algorithm (Heap)]
Open the lock
Sliding puzzle [A* Search Algorithm]
Cheapest flights within K stops [Dijkstra’s algorithm]
Bus routes
K-similar strings
Shortest path to get all keys [ Brute Force, Dijkstra’s algorithm]
Reachable nodes in subdivided graph [Dijkstra’s algorithm]
Possible bipartition [DFS]
Shortest bridge [BFS, DFS]
Numbers with same consecutive differences [Brute Force]
Rotting oranges
Coloring a border
Escape a large maze
Shortest path in binary matrix
Path with maximum minimum value [Binary Search + DFS, Dijkstra’s algorithm]
Shortest path with alternating colors [BFS]
Parallel courses [Topological Sort + BFS]
Maximum level sum of a binary tree [DFS, BFS]
As far from land as possible
Last substring in lexicographical order
Sort items by groups respecting dependencies [Topological Sort]
Minimum moves to reach target with rotations
Stepping numbers [Precompute, Binary Search]
Tree diameter [ DFS, BFS]
Minimum moves to move a box to their target location [A* Search Algorithm]
Minimum number of flips to convert binary matrix to zero matrix
Sequential Digits
Shortest path in a grid with obstacles elimination [A* Search Algorithm]
Maximum candies you can get from boxes
Deepest leaves sum
Jump game III
Get watched videos by your friends
Jump game IV
Minimum cost to make at least one valid path in a grid [A* Search Algorithm, 0-1 BFS, Deque]