Number of connected components(graph) anomalous behavior of my program!!!

Revision en2, by competitivecoder, 2015-06-10 06:35:40

I have been trying to debug my code for hours still don't know why my code is printing wrong answer.Actually I am trying to find number of connected components of a graph.Please help me in this regard.Thank you _/_ .Question link

Tags graphs, connected components, help, needed

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English competitivecoder 2015-06-10 06:35:40 1 Tiny change: ' you _/\_ .[Questio' -> ' you _/\_ .[Questio'
en1 English competitivecoder 2015-06-10 06:35:12 434 Initial revision (published)