How does DFS work?

Please explain me how does dfs work?

check out this video by madhavan mukund- acm chair of india.

http://www.geeksforgeeks.org/depth-first-traversal-for-a-graph/ in this link you will get theoritical as well as
how to implement that in code

Check this link for Working of the Algo Visually

1 Like