Exercise 5: Vertex Degrees
-
Write the
degree(g,v) function (assume adj.matrix representation)
-
Write a function that ...
- takes a graph and an array of nV
int s
- sets the vth array entry to the degree of vertex v
Use the function interface:
void degrees(Graph g, int ds[]) { ... }
|
-
Use
degrees to re-implement hasEulerPath()
|