Finding the shortest path between nodes using queues and breadth-first-search

Breadth-first search

A breadth-first search operates First-in First-out (FiFo). That is, it selects the oldest frontier node. This results in a broad, rather than a deep search. Once all branches have been explored, the algorithm will move deeper. Path cost is not considered in this algorithm.

Informed: No

Time: \(O(b^d)\)

Space: \(O(b^d)\)

Complete: Yes

Optimal: Picks the shallowest solution. Optimal of path costs are identical.