Connectivity in undirected graphs:
You'll need to write 2 classes
1st class will have inside it an array of linked list and another class will hold edges
you'll need to initialize the graph in a constructor with nodes and neighbors.
you should indicate neighbors by an index
I think you also need to use global variables
Attachment:- pr1.pdf