Is my understanding of all the options correct?

In option 1 , we will need a vector of pair<int,int> to store edges in addition to vector which will store vertices right?

Option 2 - It’s a simple adjacency matrix.

Option 3 - It’s also adjacency matrix.

Please correct me if I am wrong.

please share the question as well

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.

1 Like