The Gateway to Computer Science Excellence
0 votes
140 views

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

in Algorithms by Active (3.2k points) | 140 views
0

@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.
by Loyal (6.9k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,645 questions
56,598 answers
195,838 comments
102,145 users