input nodes in linked list cpp code example
Example: how to use a new node c++
struct node(){
int key;
node *next;
node(x){
key = x;
next = NULL;
}}
// after you take a input of a linked list .
// creating a new node.
node *temp = new node(key); // tem pointer pointing towards the new node.
temp -> next = head; // inserting the mew node in the start .