问题
So I have a graph in the form of an adjacency list, structured as in the code below. Given this form of a data structure, I was wondering how it would be possible to go about finding and printing all the possible paths from a given node to another node. I'm aware I might have to used stacks to perform a DFS or queues to perform BFS, which I know how to do, but am confused by how to find all the possible paths
typedef struct graph {
int n, maxn;
Vertex** vertices;
}Graph;
typedef struct vertex {
char* label;
Edge* first_edge;
}Vertex;
typedef struct edge {
int u, v;
int weight;
Edge* next_edge;
}Edge ;
来源:https://stackoverflow.com/questions/43142841/find-all-paths-from-one-node-to-another-in-an-undirected-graph-adjacency-list