I am learning graph (Adjacency List) from geeks to geeks and I see this code:
// A structure to represent an adjacency list node
struct AdjListNode
{
int dest;
struct AdjListNode* next;
};
// A structure to represent an adjacency liat
struct AdjList
{
struct AdjListNode *head; // pointer to head node of list
};
// A structure to represent a graph. A graph is an array of adjacency lists.
// Size of array will be V (number of vertices in graph)
struct Graph
{
int V;
struct AdjList* array;
};
I would like to know the difference betwee:
struct AdjListNode* next;
and struct AdjListNode *head;
and struct AdjListNode * head;