31
Exercise 6: Connectedness Checks
Assume that
components(g)
has generated
componentOf[nV]
Implement
sameComponent(g,v,w)
to check if
v
and
w
are in same subgraph
Implement
nComponents(g)
to count the number of subgraphs