Answer failing for 1 test case

I did the following steps:

  1. Created a Graph
  2. Created an arraylist of arraylist which contains connected components
  3. no put a loop over loop (like selection sort) so as to calculate all the combinations possible

Hey @ap8730390
I see that you have got a correct answer in the question. Do you have any further doubts?

I have a doubt in Beautiful Vertices.Please look into that as well. My code is giving a warning in Coding blocks compiler bu in my text editor it’s working fine.