Node of the list, in which each element points to the next element, and the head of the list will look like this:
typedef struct Node {
int value;
Node* next;
Node** head;
} Node;
the head can change, so we used Node ** head. I know that classes are passed as a reference, so I can make the first 2 attributes as follows:
class Node {
int value;
Node next;
????
}
How to create a head attribute?
source
share