Can you give me the code

can you give me the code

Create the link list. For insertion in head:
Suppose that N is the new node then you just have to do N->next=head; head=N;

Now, try to solve problem.