breadth-first search (bfs)
Breadth-first search (BFS) is an algorithm used to traverse or search a graph or tree data structure. It explores all the vertices or nodes in a level-by-level manner, starting from the root or a given starting point. BFS visits nodes in a breadth-wise manner, expanding the search to adjacent nodes before moving to the next level or layer of nodes. This approach ensures that the shortest path between nodes is found, making BFS useful for solving problems involving pathfinding, shortest path, connected components, and more.
Requires login.
Related Concepts (1)
Similar Concepts
- b+ tree
- b-trees
- binary search tree
- binary search trees
- binary tree traversal algorithms
- breadth-first search
- depth-first search
- depth-first search (dfs)
- depth-limited search
- dijkstra's algorithm
- in-order traversal
- in-order traversal of binary trees
- iterative tree traversal
- path traversal
- tree traversal