2 votes 2 votes In double linked list organization, insertion and deletion of a record involves maximum modification of number of pointers respectively ___________________ DS data-structures + – srestha asked Jan 2, 2017 srestha 824 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply saurabh rai commented Jan 2, 2017 reply Follow Share 4 nd 2 resp. 1 votes 1 votes srestha commented Jan 2, 2017 i edited by srestha Jan 2, 2017 reply Follow Share See the code P---------->Q------------->R P,R are 2 nodes, and in 1st code we are inserting Q q->next=p->next; p->next=q; q->prev=p->next->prev; r->prev=q->next->prev; p->next=p->next->next; r->prev=r->prev->prev; Here in this 2nd code P,Q, R are 3 nodes, and we want to delete Q from it. just a simple example to understand the code :) 0 votes 0 votes saurabh rai commented Jan 2, 2017 reply Follow Share plzz explain little more.. i m nt getting u... 1 votes 1 votes saurabh rai commented Jan 2, 2017 reply Follow Share srestha ur code is nt correct http://quiz.geeksforgeeks.org/doubly-linked-list/ 2 votes 2 votes sushmita commented Mar 25, 2017 reply Follow Share if you just talk about modification of existing pointers then it should be 2 for insertion. 0 votes 0 votes Shubhanshu commented Sep 20, 2017 reply Follow Share @srestha, I think for delete purpose also we need to update 4 pointers. Considering your example, ptrs modified as follow 1. p.next 2. r.prev 3. q.next = null // Dangling PTR 4. q.prev = null // Dangling Ptr 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes in insertion,Maximum number of modified Pointers=4 in deletion it is 2 Aboveallplayer answered Jan 2, 2017 Aboveallplayer comment Share Follow See all 0 reply Please log in or register to add a comment.