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.

DFS and BFS Time and Space complexities of 'Number of islands' on Leetcode

Here is the question description. The first 2 suggested solutions involve DFS and BFS. This question refers to the 1st two …

algorithm big-o depth-first-search breadth-first-search
Breadth-First in Prolog

What is the general idea of using breadth-first over the default depth-first search scheme in Prolog? Not taking infinite branches? …

prolog breadth-first-search logic-programming
Which Procedure we can use for Maze exploration BFS or DFS

I know we can use DFS for maze exploration. But I think we can also use BFS for maze exploration. …

algorithm time-complexity depth-first-search breadth-first-search maze
Breadth first search branching factor

The run time of BFS is O(b^d) b is the branching factor d is the depth(# of level) …

performance algorithm artificial-intelligence breadth-first-search
BFS to check if a graph is bipartite in c++

I am implementing an algorithm to determine whether an undirected graph is bipartite or not. Based on this pseudo-code made ​​…

c++ graph-theory breadth-first-search bipartite
Fast implementation of queues in Lua?

I am making a game using Lua and I need to use Breadth-first search to implement a fast path-finding algorithm …

lua queue path-finding breadth-first-search lua-table
Why is the complexity of BFS O(V+E) instead of O(V*E)?

Some pseudocode here (disregard my style) Starting from v1(enqueued): function BFS(queue Q) v2 = dequeue Q enqueue all unvisited …

algorithm complexity-theory breadth-first-search
Implementation of BFS, DFS and Dijkstra

Is it true that the implementation of BFS, DFS and Dijkstra are almost the same, except that BFS uses queue, …

graph-algorithm dijkstra breadth-first-search depth-first-search
Time Complexity of breadth first search with adjacency matrix representation?

In bfs we have to look up each node and for each node we have to look all elements of …

breadth-first-search adjacency-matrix
Solving 8-puzzle game using DFS

I am trying to solve the 8-puzzle problem with DFS starting from this code implemented with BFS. What is the …

java breadth-first-search depth-first-search sliding-tile-puzzle