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.

Using BFS for Weighted Graphs

I was revising single source shortest path algorithms and in the video, the teacher mentions that BFS/DFS can't be …

algorithm graph shortest-path breadth-first-search
How to detect if a directed graph is cyclic?

How can we detect if a directed graph is cyclic? I thought using breadth first search, but I'm not sure. …

graph breadth-first-search cyclic
Maze solving with breadth first search

Can someone please explain how could I solve a maze using breadth first search? I need to use breadth first …

breadth-first-search maze
Is A* the best pathfinding algorithm?

It is generally said that A* is the best algorithm to solve pathfinding problems. Is there any situation when A* …

path-finding a-star depth-first-search breadth-first-search
Difference between Breadth First Search, and Iterative deepening

I understand BFS, and DFS, but for the life of me cannot figure out the difference between iterative deepening and …

search depth-first-search breadth-first-search iterative-deepening
Level Order Traversal of a Binary Tree

void traverse(Node* root) { queue<Node*> q; Node* temp_node= root; while(temp_node) { cout<<temp_…

c++ algorithm binary-tree breadth-first-search tree-traversal
Breadth-first search on an 8x8 grid in Java

What I'm trying to do is count how many moves it takes to get to the goal using the shortest …

java breadth-first-search maze
Difference between 'backtracking' and 'branch and bound'

In backtracking we use both bfs and dfs. Even in branch and bound we use both bfs and dfs in …

depth-first-search backtracking breadth-first-search branch-and-bound
Python Implement Breadth-First Search

I found an example online, however, returning only the sequence of the BFS elements is not enough for calculation. Let's …

python graph-theory breadth-first-search
Efficiently finding the shortest path in large graphs

I'm looking to find a way to in real-time find the shortest path between nodes in a huge graph. It …

python graph shortest-path dijkstra breadth-first-search