Just like title, Is it better to open the memory pool or a vector to save a graph?
I personally like using Vector to save a graph...
I just learned graph theory, so I don't know how to use it. :(
memory pool:
struct Edge{
int next;
int to;
int w;
};
void add(int u,int v,int w) {
edge[cnt].w = w;
edge[cnt].to = v;
edge[cnt].next = head[u];
head[u] = cnt++;
}