Top "Depth-first-search" questions

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

Kernel module that iterates over all tasks using depth first tree

So I know how to create a kernel and to iterate over the processes linearly by Simply including linux/sched.…

linux-kernel task depth-first-search
deceptively simple implementation of topological sorting in python

Extracted from here we got a minimal iterative dfs routine, i call it minimal because you can hardly simplify the …

python algorithm graph-theory depth-first-search topological-sort
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
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
Depth First Search on 2-D array

I am trying to learn DFS by creating a program that navigates my ogre through a maze (2d array).This …

java multidimensional-array traversal depth-first-search
Topological sort to find the number of paths to t

I have to develop an O(|V|+|E|) algorithm related to topological sort which, in a directed acyclic graph (DAG), …

algorithm graph depth-first-search topological-sort
Ideal algorithm for finding all paths in a graph

Let's take this graph for example: Now let's say I'm starting at vertex 3 and want to find vertex 7. Depth first …

algorithm depth-first-search
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