> For the complete documentation index, see [llms.txt](https://timmybeeflin.gitbook.io/cracking-leetcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs.md).

# BFS

- [102. Binary Tree Level Order Traversal (BFS)](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/102.-binary-tree-level-order-traversal-bfs.md)
- [103. Binary Tree Zigzag Level Order Traversal](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/103.-binary-tree-zigzag-level-order-traversal.md)
- [127. Word Ladder - BFS](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/127.-word-ladder.md)
- [133. Clone Graph (BFS, DFS)](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/133.-clone-graph.md)
- [200. Number of Islands (BFS)](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/200.-number-of-islands.md)
- [733. Flood Fill](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/733.-flood-fill.md)
- [1765. Map of Highest Peak](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/1765.-map-of-highest-peak.md)
- [1926. Nearest Exit from Entrance in Maze](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/1926.-nearest-exit-from-entrance-in-maze.md)
- [317. Shortest Distance from All Buildings](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/317.-shortest-distance-from-all-buildings.md)
- [399. Evaluate Division](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/399.-evaluate-division.md)
- [433. Minimum Genetic Mutation](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/433.-minimum-genetic-mutation.md)
- [542. 01 Matrix](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/542.-01-matrix.md)
- [547. Number of Provinces](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/547.-number-of-provinces.md)
- [934. Shortest Bridge](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/934.-shortest-bridge.md)
- [994. Rotting Oranges](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/994.-rotting-oranges.md)
- [1091. Shortest Path in Binary Matrix](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/1091.-shortest-path-in-binary-matrix.md)
- [690. Employee Importance](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/690.-employee-importance.md)
- [773. Sliding Puzzle](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/773.-sliding-puzzle.md)
- [1293. Shortest Path in a Grid with Obstacles Elimination](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/1293.-shortest-path-in-a-grid-with-obstacles-elimination.md)
- [818. Race Car](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/818.-race-car.md)
- [Dijkstra](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/dijkstra.md)
- [2577. Minimum Time to Visit a Cell In a Grid](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/2577.-minimum-time-to-visit-a-cell-in-a-grid.md)
- [01 BFS](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/01-bfs.md)
- [(01 BFS) 1368. Minimum Cost to Make at Least One Valid Path in a Grid](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/01-bfs/01-bfs-1368.-minimum-cost-to-make-at-least-one-valid-path-in-a-grid.md)
- [(01 BFS) 2290. Minimum Obstacle Removal to Reach Corner](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/01-bfs/01-bfs-2290.-minimum-obstacle-removal-to-reach-corner.md)
- [Page 14](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/01-bfs/01-bfs-2290.-minimum-obstacle-removal-to-reach-corner/page-14.md)
- [2642. Design Graph With Shortest Path Calculator](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/2642.-design-graph-with-shortest-path-calculator.md)
- [1514. Path with Maximum Probability (spfa, dijkstra)](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/1514.-path-with-maximum-probability-spfa-dijkstra.md)
- [lintcode 1565 · Modern Ludo I (spfa, dijkstra)](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/lintcode-1565-modern-ludo-i-spfa-dijkstra.md)
- [743. Network Delay Time (dijkstra](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/743.-network-delay-time-dijkstra.md)
- [2662. Minimum Cost of a Path With Special Roads](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/2662.-minimum-cost-of-a-path-with-special-roads.md)
- [787. Cheapest Flights Within K Stops (Dijsktra, DP](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/787.-cheapest-flights-within-k-stops-dijsktra-dp.md)
- [490. The Maze (spfa](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/490.-the-maze-spfa.md)
- [505. The Maze II (spfa](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/505.-the-maze-ii-spfa.md)
- [499. The Maze III (spfa, dijkstra](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/499.-the-maze-iii-spfa-dijkstra.md)
- [1631. Path With Minimum Effort (dijkstra](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/1631.-path-with-minimum-effort.md)
- [752. Open the Lock](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/752.-open-the-lock.md)
- [1197. Minimum Knight Moves](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/1197.-minimum-knight-moves.md)
- [1730. Shortest Path to Get Food](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/1730.-shortest-path-to-get-food.md)
- [305. Number of Islands II (union-find)](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/305.-number-of-islands-ii-union-find.md)
- [803. Bricks Falling When Hit (backward union find)](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/803.-bricks-falling-when-hit-backward-union-find.md)
- [765. Couples Holding Hands](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/765.-couples-holding-hands.md)
- [841. Keys and Rooms](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/841.-keys-and-rooms.md)
- [2812. Find the Safest Path in a Grid](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/2812.-find-the-safest-path-in-a-grid.md)
- [2510. Check if There is a Path With Equal Number of 0's And 1's](https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs/2510.-check-if-there-is-a-path-with-equal-number-of-0s-and-1s.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://timmybeeflin.gitbook.io/cracking-leetcode/dfs-and-bfs/bfs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
