node 1 should be 1
node 2 should be 2
node 3 should be 3
head points to node 1
1 2 3 4 5 6 7
|
struct Node{
int data;
Node *next;
};
Node *h;
h = new Node;
h->data = 1;
|
I'm not allowed to declare another variable, yet I need three nodes for the linked list. I'm not sure how to do this.
Last edited on