What ds should be used?

I know it’s a graph question, but should I use matrix to store these or an adjacency list.
My question is- should i store the graph in matrix or adjacency list, and should i make the color and size matrix differently?
and that has to be created inside graph class?

you can create a graph using

vector<vector<int>> graph(100005)

Now,
instead of int as data type of element inside the inner vector in graph, you can use other according to your need. Declaring graph like this, gives a lot of options to modify graph according to any problem.

Thanks.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.