About 638,000 results
Open links in new tab
  1. Breadth-first search - Wikipedia

    Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth …

  2. Breadth First Search or BFS for a Graph - GeeksforGeeks

    Dec 6, 2025 · Breadth First Search (BFS) is a graph traversal algorithm that starts from a source node and explores the graph level by level. First, it visits all nodes directly adjacent to the source.

  3. How Do Depth First and Breadth First Search Work?

    That's where algorithms like breadth-first search (BFS) and depth-first search (DFS) become really important. They are commonly used to traverse graphs and for finding a path between …

  4. Breadth-First Search (BFS) | Brilliant Math & Science Wiki

    Breadth-first search (BFS) is an important graph search algorithm that is used to solve many problems including finding the shortest path in a graph and solving puzzle games (such as …

  5. BFS Graph Algorithm (With code in C, C++, Java and Python)

    Breadth first traversal or Breadth first Search is a recursive algorithm for searching all the vertices of a graph or tree data structure. In this tutorial, you will understand the working of bfs …

  6. Breadth First Search - Algorithms for Competitive Programming

    Oct 13, 2024 · At this point we can stop the BFS, and start a new BFS from the next vertex. From all such cycles (at most one from each BFS) choose the shortest. Find all the edges that lie on …

  7. Graph Theory - Breadth-First Search

    Breadth-First Search (BFS) is a graph traversal algorithm used to systematically explore nodes and edges in a graph. It starts at a selected node (often called the 'root') and explores all …

  8. Breadth First Search Tutorials & Notes - HackerEarth

    BFS is a traversing algorithm where you should start traversing from a selected node (source or starting node) and traverse the graph layerwise thus exploring the neighbour nodes (nodes …

  9. Breadth-First Search (BFS) – Iterative and Recursive …

    Sep 19, 2025 · Breadth–first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred …

  10. The breadth-first search algorithm (BFS) (article) - Khan Academy

    Breadth-first search assigns two values to each vertex v : along some shortest path from the source vertex. The source vertex's predecessor is some special value, such as null, indicating …