What is an efficient way to implement Adjacency List Representation of Graph in C++?
- vector *edges;
- list *edges;
- map<int, int> *edges;
In my opinion, it should be option 3, but I could not find any cons in using that…
Are there any?
Can someone please help me, which will be the most efficient way of implementing the Adjacency List and also for Competitive Programming?
Source: Windows Questions C++