Correct Answer - Option 3 : 2 pointers
Circular linked list:
In singly linked lists and doubly linked lists, the end of lists is indicated with a NULL value. But circular linked lists do not have ends. In circular linked lists, each node has a successor, and the last node points to the first node instead of NULL.
Example
Let x be a variable pointer and head.
Head is the pointer of the circular linked list.
Now to insert a new record (node) y, we have to loop through the linked list from the head to the last node like this pseudocode below.
x=head
while(x->next!=head)
{
x=x->next;
}
After finishing the loop x is now the last node and we will append the list. y is the next node of x Then the next of y will have to point to the head since the linked list is circular. The pseudocode for this task is below.
x->next=y;
y->next=head;
So There needs modification of two pointers.
So the correct answer is Option 3