Question: Working with graph _ am _ neighbours: / * * * Returns an array of all vertices connected to a vertex. * vertices must be

Working with graph_am_neighbours: /**
* Returns an array of all vertices connected to a vertex.
* vertices must be defined with a size of source->size.
*
* @param source - pointer to a graph
* @param vertex - index of a vertex
* @param vertices - array of neighbours
* @param count - number of vertices
*/
and graph_am_depth_traversal: /**
* Performs a depth-first traversal of a graph.
*
* @param source - pointer to a graph
* @param vertex - index of a vertex to start traversal from
* @param vertices - array of resulting vertices
* @param count - number of items in vertices
*/
I am getting stuck on the depth-first traversal and what to do after that when finding the neighbouring vertexes ```
\Theta/**
* Stores row/...... pairs of adjacency matrix values.
*/
- typedef struct {
int row;
int col;
} graph_am_pair;
e/**
* Adjacency Matrix Graph header.
*/
- typedef struct {
int size; // size (width/height) of adjacency matrix
int *values; // pointer to 2D array of values
} graph_am;
```
Working with graph _ am _ neighbours: / * * *

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!