I did the following steps:
- Created a Graph
- Created an arraylist of arraylist which contains connected components
- no put a loop over loop (like selection sort) so as to calculate all the combinations possible
I did the following steps:
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.