Name

graph_is_adjacent

Synopsis

int graph_is_adjacent(const Graph *graph, const void *data1, const void *data2);

Return Value

1 if the second vertex is adjacent to the first vertex, or otherwise.

Description

Determines whether the vertex specified by data2 is adjacent to the vertex specified by data1 in graph.

Complexity

O (V ), where V is the number of vertices in the graph.

Get Mastering Algorithms with C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.