825 views
0 0 votes

there are multiple algorithm of DFS available and i cant figure out which one to follow for solving question asking for the nodes which aren’t pushed into the stack or the nodes which are pushed more than once,

Tried to figure out from already asked question but still can’t get it,

https://gateoverflow.in/98484/dfs-using-stack

https://gateoverflow.in/161225/dfs-number-of-nodes-not-pushed-into-the-stack

1 Answer

0 0 votes
Always use the standard algorithm which uses Stack until and unless mentioned the other way around.
Position:
Show:

Related questions

0 0 votes
0 0 answers
1.5k
1.5k views
Na462 asked Feb 18, 2018
1,542 views
Let T be a depth first search tree in an undirected graph G. Vertices u and ν are leaves of this tree T. The degrees of both u and ν in G are at least 2.In such case in t...
1 1 vote
2 2 answers
3.0k
3.0k views
Gate Aspirant 2 asked Dec 19, 2014
2,978 views
Which of the following statement is correct regarding DFS? 1) All the vertices are pushed in the stack during DFS Traversal. 2) No vertex is pushed more than once in the ...
0 0 votes
0 0 answers
878
878 views
iarnav asked May 13, 2018
878 views
I know, Kosaraju algorithm and there's one other algorithm which involves reversing of G and using DFS, but two times, but there's some algorithm which uses DFS only time...
3 3 votes
0 0 answers
1.3k
1.3k views
Shubhanshu asked Oct 20, 2017
1,252 views
Which of the following are true:-1. DFS continues to visited first unvisited successor of each node as long as possible.2. Certain nodes are pushed into the stack.3. DFS ...