[prev] 40 [next]

Exercise 8: Checking Neighbours (iii)

Assuming an adjacency list representation ...

Write a function to check whether two vertices are directly connected by an edge

Use the function interface:

int connected(Graph g, Vertex x, Vertex y);

Do we care about edge representation   (e.g. v < w) ?