You are viewing a single comment's thread. Return to all comments →
adj[v].add(w); adj[w].add(v);
2.in your DfsUtil() if(visisted[n]==false) then DfsUtil(n) this needs to be added
Seems like cookies are disabled on this browser, please enable them to open this website
Journey to the Moon
You are viewing a single comment's thread. Return to all comments →
2.in your DfsUtil() if(visisted[n]==false) then DfsUtil(n) this needs to be added