Is it better to open the memory pool or a vector to save a graph?

Правка en1, от Inversentropir-36, 2020-05-29 05:00:06

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++;  
}  
Теги #graph theory, #data structure

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Inversentropir-36 2020-05-29 05:00:06 511 Initial revision (published)