Doutb in algorithm

sir we are running dfs from 0 but if in such a test case if 0 node has some indegree and 0 outdegree then will this algo work …say if we swap node 6 and node 0 in the test case discussed in lecture

@vgvg2242 no i don’t think as there will be no child to go to. you have to choose source vertex which has some outdegree.
dont forget to hit like and mark resolved if cleared :smiley: