Top "Breadth-first-search" questions

In graph theory, breadth-first search (BFS) is a graph search algorithm that begins at the root node and explores all the neighboring nodes.

Returning only the vertices in the actual shortest path

I know the title is a bit messy, but I don't know how to explain it better. What I'm trying …

java shortest-path breadth-first-search graph-traversal
Why is Depth-First Search said to suffer from infinite loops?

I have read about DFS and BFS many times but I have this doubt lingering my mind since long. In …

algorithm search depth-first-search breadth-first-search
How to get the path between 2 nodes using Breadth-First Search?

I am trying to find a path between two nodes in a graph, where the edges are unweighted. I am …

search graph path breadth-first-search
Shortest path in JavaScript

I have been searching for weeks for a way to compute shortest paths in JavaScript. I have been playing with …

javascript shortest-path breadth-first-search
BFS on Adjacency Matrix

I'm trying to implement a BFS on adjacency matrix of undirected unweighted graph which returns the number of nodes visited. …

c++ breadth-first-search
Implementing DFS and BFS for binary tree

I'm trying to traverse a binary tree using depth first traversal and breadth first traversal, but I'm running into trouble. …

python tree depth-first-search breadth-first-search
Question about breadth-first completeness vs depth-first incompleteness

According to Norvig in AIMA (Artificial Intelligence: A modern approach), the Depth-first algorithm is not complete (will not always produce …

depth-first-search breadth-first-search
Performing DFS and BFS on a directed graph

Suppose we have a graph such as: If you wanted a path from 0 to 5, in what order will we visit …

algorithm graph depth-first-search breadth-first-search
Termination Criteria for Bidirectional Search

According to most of the reading I have done, a bidirectional search algorithm is said to terminate when the "forward" …

algorithm search graph breadth-first-search bidirectional
Breadth First Search - Java

I have as a school excersice to implement breadth first search in java. I have implemented almost everything but the …

java algorithm search breadth-first-search