GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
85 views
In double linked list organization, insertion and deletion of a record involves maximum modification of number of pointers respectively ___________________
asked in DS by Veteran (53.8k points)   | 85 views
4 nd 2 resp.

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 :)

plzz explain little more.. i m nt getting u...
if you just talk about modification of existing pointers then it should be 2 for insertion.

1 Answer

0 votes
in insertion,Maximum number of modified Pointers=4

in deletion it is 2
answered by Veteran (18.3k points)  

Related questions

0 votes
1 answer
1
asked ago in DS by iarnav Active (1.1k points)   | 13 views
0 votes
2 answers
2
asked in DS by smartmeet Loyal (3.1k points)   | 129 views
0 votes
0 answers
3
asked in DS by smartmeet Loyal (3.1k points)   | 39 views


Top Users May 2017
  1. akash.dinkar12

    3292 Points

  2. pawan kumarln

    1652 Points

  3. sh!va

    1650 Points

  4. Arjun

    1424 Points

  5. Bikram

    1372 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1142 Points

  8. Angkit

    1044 Points

  9. LeenSharma

    904 Points

  10. srestha

    718 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    458 Points

  2. Arnab Bhadra

    402 Points

  3. pawan kumarln

    278 Points

  4. Ahwan

    236 Points

  5. bharti

    194 Points


22,786 questions
29,121 answers
65,184 comments
27,661 users