Iterative Depth First Traversal of Graph - GeeksforGeeks
Iterative Depth First Traversal of Graph
Depth First Traversal (or Search) for a graph is similar to Depth First Traversal (DFS) of a tree. The only catch here is, unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we use a boolean visited array.
Read full article from Iterative Depth First Traversal of Graph - GeeksforGeeks
No comments:
Post a Comment