Nepedia
Back to Discover
Developing Reader
🔢

Breadth-first search

math Maturity 11-13 Next article →

Imagine you want to find a prize in a maze.

BFS-Algorithm Search Way
BFS-Algorithm Search Way

You do not run down one path. Instead, you look at every path near you first. Then, you look at the next paths. This helps you find the shortest way out.

Animated BFS
Animated BFS

This way of searching is called breadth-first search. It uses a list to remember where to go next. This method is very smart. It will always find the prize if it is there. It is a great way to solve puzzles.

83 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (5)
File:Animated BFS.gif
Animated BFS.gif
File:BFS-Algorithm Search Way.gif
BFS-Algorithm Search Way.gif
File:Tic-tac-toe-game-tree.svg
Tic-tac-toe-game-tree.svg
File:MapGermanyGraph.svg
MapGermanyGraph.svg
File:GermanyBFS.svg
GermanyBFS.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.