I am unable to make a function/method for adding a vertex with 4 attributes in Java namely age, name, maritalStatus and index, where the new vertex needs to inserted in the specified index.
Can someone please guide me how to go about this?
How do I store these details; in the form of adjacency matrix, adjacency list or arraylist?