@anjali007 https://gateoverflow.in/276438/which-dfs-algorithm-to-follow
will you please! check it out,
https://gateoverflow.in/276438/which-dfs-algorithm-to-follow
will anyone help me out with this!
@Gurdeep Saini Do you have any reference for your statement above on not pushing an unbranched node into the stack ?
@Shivam Kasat it is he way of implementing the DFS algo , i.e.
when we want explore any node first we push them into the stack and if the connected node of that node is already visited than there is no need to push that node into the stack ex if the connected node of node A is already visited then there is no need to push A into the stack