Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
256 views
in Information Technology by (72.7k points)
closed by
In a circularly linked list organization, insertion of a record involves the modification of 
1. No pointer
2. 1 pointer 
3. 2 pointers 
4. 3 pointers

1 Answer

0 votes
by (121k points)
selected by
 
Best answer
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

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...