[prev] 35 [next]

Exercise 7: Implementing Component Array

Add the nC and cc fields to a GraphRep

Modify the following functions to maintain them:

Graph newGraph(int nV) { ... }
void  insertE(Graph g, Edge e) { ... }
void  removeE(Graph g, Edge e) { ... }

Consider adding the dotted edges to the following graph

[Diagram:Pics/graphs/component-maint.png]