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.

Time complexity of adjacency list representation?

I am going through this link for adjacency list representation. http://www.geeksforgeeks.org/graph-and-its-representations/ I have a simple doubt …

algorithm time-complexity breadth-first-search adjacency-list
How can I find the actual path found by BFS?

The problem I'm trying to solve concerns a tree of MRT system. Each node can be connected to 4 points at …

c++ algorithm path breadth-first-search
Depth First Search and Breadth First Search Understanding

I'm making Tetris as a fun side project (not homework) and would like to implement AI so the computer can …

java algorithm depth-first-search breadth-first-search
How to modify dijkstra algorithm to find all possible paths?

I know that could be asked before already but I cannot find it. I need to modify below dijkstra algorithm …

c# algorithm graph-algorithm breadth-first-search dijkstra
Solve Cannibals/Missionaries using breadth-first search (BFS) in Prolog?

I am working on solving the classic Missionaries(M) and Cannibals(C) problem, the start state is 3 M and 3 C …

prolog breadth-first-search river-crossing-puzzle
Why is depth-first search claimed to be space efficient?

In an algorithms course I'm taking, it's said that depth-first search (DFS) is far more space efficient than breadth-first search (…

algorithm graph-algorithm breadth-first-search depth-first-search
What is the difference between breadth first searching and level order traversal?

I don't need code, just an explanation. My textbook says level order: each node at level i is processed before …

algorithm binary-search-tree graph-theory breadth-first-search
Using BFS for topological sort

Can Breadth first Search be used for finding topological sorting of vertices and strongly connected components in a graph? If …

algorithm breadth-first-search
Shortest Root to Leaf Path

What is the easiest way, preferably using recursion, to find the shortest root-to-leaf path in a BST (Binary Search Tree). …

algorithm recursion binary-tree breadth-first-search
how can a breadth-first-search-tree include a cross-edge?

Well, I know that a breadth-first-search-tree of an undirected graph can't have a back edge. But I'm wondering how can …

algorithm tree graph-algorithm breadth-first-search tree-traversal