[prev] 62 [next]

Graph ADT (Adjacency List)

Implementation of GraphRep (adjacency-list representation)

typedef struct GraphRep {
   Node **edges;  // array of lists
   int    nV;     // #vertices
   int    nE;     // #edges
} GraphRep;

typedef struct Node {
   Vertex       v;
   struct Node *next; 
} Node;


[Diagram:Pic/graphRep3.png]