Log In
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,

in Algorithms 164 views

@srestha Mam! will you please help me out with this!

1 Answer

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

Related questions

0 votes
0 answers
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 the graph there will be two cycles :- One Cycle will contain u and other one v. There cannot be a graph containig a single cycle and containing both u and v and also satisfy above Constraint. Am I right?
asked Feb 18, 2018 in Algorithms Na462 218 views
1 vote
2 answers
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 stack during traversal.
asked Dec 19, 2014 in Algorithms Gate Aspirant 2 492 views
0 votes
0 answers
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, but I can't be able find that algorithm. Someone please share that.
asked May 13, 2018 in Algorithms iarnav 137 views
2 votes
0 answers
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 first visits all the immediate successors of a node before moving to their successors 4. Certain nodes are ... iterative all nodes are pushed into the stack. 3. False -- this happens in BFS not in DFS. 4. True -- Iterative DFS.
asked Oct 20, 2017 in Algorithms Shubhanshu 265 views