breadthfirst
Breadthfirst, commonly referred to as breadth-first search (BFS), is a graph traversal algorithm that explores the graph level by level. It starts at a chosen source vertex and visits all neighbors at distance one, then those at distance two, and so on. This systematic expansion makes BFS useful for discovering shortest paths in unweighted graphs and for level-order traversals of trees.
Implementation typically uses a queue to manage the frontier. The algorithm initializes by enqueuing the start
Complexity considerations: BFS runs in O(V+E) time, where V is the number of vertices and E the
Key properties include the ability to find the shortest path (in terms of the number of edges)