[prev] 63 [next]

Exercise #9: Checking Neighbours (ii)

Assuming an adjacency list representation …

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

bool adjacent(Graph g, Vertex x, Vertex y) { … }