[prev] 33 [next]

Exercise 6: Checking Neighbours (ii)

Assuming an adjacency matrix 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);