



Step 1 - Create a newNode with the given value.It needs to skip the desired number of nodes to reach the node after which the new node will be inserted. It involves insertion after the specified node of the linked list. Step 5 - Keep moving the temp to its next node until it reaches the last node in the list (until temp → next is equal to NULL).Step 4 - If it is Not Empty then, define a node pointer temp and initialize with head.Step 3 - If it is Empty then, set head = newNode.Step 2 - Check whether list is Empty (head = NULL).Step 1 - Create a newNode with a given value and newNode → next as NULL.Different logics are implemented in each scenario.

The new node can be inserted as the only node in the list or it can be inserted as the last one. It involves insertion at the last of the linked list. Step 4 - If it is Not Empty then, set newNode→next = head and head = newNode.Step 3 - If it is Empty then, set newNode→next = NULL and head = newNode.Step 2 - Check whether list is Empty (head = NULL).Step 1 - Create a newNode with given value.It needs to make the new node the head of the list. It involves inserting an element at the front of the list. Based on the position of the new node being inserted, the insertion is categorized into the following categories. The insertion into a singly linked list can be performed at different positions. Here we see Insertion and Deletion in detail.Basic operations supported by a list are insertion, deletion, display, and search.In the Singly linked list data navigation happened in the forwarding direction only.Always the last node of the list contains a pointer to the null.In a single linked list, the address of the first node is always stored in a reference node known as front.The data part of the node stores actual information that is to be represented by the node while the linked part of the node stores the address of its immediate successor.Nodes in the singly linked list consist of two parts such as the data part and link part.A Singly-linked list can be defined as the collection of an ordered set of elements.Each node contains two fields that hold a particular address where data is stored and the pointer which contains the address of the next node in the memory.A Linked List is a collection of objects called nodes that are randomly stored in the memory.
