Top "Depth-first-search" questions

Depth-first search (DFS) is an algorithm for traversing or searching a tree, tree structure, or graph.

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
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
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
How to Traverse an NLTK Tree object?

Given a bracketed parse, I could convert it into a Tree object in NLTK as such: >>> from …

parsing tree nlp nltk depth-first-search
Spanning Tree VS. Spanning Forest

What's the difference between a Spanning Tree and a Spanning Forest in graphs, conceptually. Also, is it possible to construct …

algorithm graph-theory depth-first-search breadth-first-search spanning-tree
Back edges in a graph

I'm having a hard time understanding Tarjan's algorithm for articulation points. I'm currently following this tutorial here: https://www.hackerearth.…

algorithm graph graph-theory depth-first-search tarjans-algorithm
Implementing a depth-first tree iterator in Python

I'm trying to implement an iterator class for not-necessarily-binary trees in Python. After the iterator is constructed with a tree's …

python algorithm tree iterator depth-first-search