🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Breadth First Search

In plain terms

Exploring a graph level by level outward from a start node.

Going deeper

BFS visits all neighbors at the current distance before moving farther, using a queue. It finds the shortest path in unweighted graphs.

Under the hood

O(V+E) time; guarantees shortest paths in unweighted graphs and explores in expanding 'rings'.

Examples

Shortest path (unweighted), web crawling, social-network degrees, maze solving.

Think of it like...

Like ripples spreading out from a stone dropped in water, reaching nearest points first.

Feedback & Bug Report