Algorithm: we will add the new node in the second position, then swap the value of the first and second node.
Code:
Let k is a pointer to the new node which we going to insert. k->next = head->next., head->next = k. now swap(k->data, head->data).
{code for swap : temp = head->data; head->data = k->data; k->data =temp;}
Time complexity: O(1)