Help me in solving LINKLMCQ02 problem

My issue

this answer

Learning course: Linked Lists
Problem Link: https://www.codechef.com/learn/course/linked-lists/LINKEDLIST01/problems/LINKLMCQ02

Answer is

  1. Create a newnode
  2. Update head tof linked list to t newmode
    3.Set the next of new Node to the head of the linked list