1 1 vote DFS Graph Traversal: Starting vertex $=\mathrm{V}_{6}$ Identify valid DFS. $6,8,7,5,4,2,1$ $6,3,1,2,4,5,8,7$ $6,3,7,8,5,2,4,1$ $6,8,5,4,2,1,7$ Algorithms depth-first-search algorithms graph-algorithms data-structures test-series + – Shubham Kumar Gupta 1.8k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply Red_devil commented Dec 3, 2017 reply Follow flag c should be answer 1 1 replyShare Shubham Kumar Gupta commented Dec 3, 2017 reply Follow flag can you explain? 0 0 replyShare air1ankit commented Dec 3, 2017 reply Follow flag Can you please explain.. 0 0 replyShare Please log in or register to add a comment.
2 2 votes V6(3,8) V3(1,7) V7(8) V8(4,5) V5(2) V2(1,4) V4() V1() because it is DFS use the stack. in bracket i have put the node adjacent to the vertex. Red_devil answered Dec 3, 2017 Red_devil comment Share Follow See 1 comment 1 1 comment reply vamp_vaibhav commented Dec 4, 2017 reply Follow flag I think there is something wrong with this solution Plz Cross check.. Because initially while accessing 6 you have inserted 3 and 8 it means they are visited according to algorithm.. You cannot again push 8 while accessing 7 even you can't pop 8 until the above elements are not popped 0 0 replyShare Please log in or register to add a comment.