breddeførstsøgning
Breddeførstsøgning, often translated as breadth-first search (BFS), is a graph traversal algorithm that explores a graph level by level. It starts at a selected vertex and explores all of the neighbor vertices at the present depth before moving on to vertices at the next depth level. BFS is an important algorithm in computer science, particularly in the study of graphs.
The algorithm works by using a queue data structure. Initially, the starting vertex is added to the
BFS is guaranteed to find the shortest path in terms of the number of edges between the