GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
87 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 (54.9k points)   | 87 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.5k points)  

Related questions

0 votes
1 answer
1
asked in DS by iarnav Active (1.4k points)   | 39 views
0 votes
2 answers
2
asked in DS by smartmeet Loyal (3.2k points)   | 205 views
0 votes
1 answer
3
asked in DS by smartmeet Loyal (3.2k points)   | 51 views


Top Users Jun 2017
  1. Bikram

    3912 Points

  2. Arnab Bhadra

    1550 Points

  3. Hemant Parihar

    1502 Points

  4. Niraj Singh 2

    1501 Points

  5. Debashish Deka

    1480 Points

  6. junaid ahmad

    1432 Points

  7. pawan kumarln

    1366 Points

  8. Arjun

    1246 Points

  9. Rupendra Choudhary

    1242 Points

  10. rahul sharma 5

    1240 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 Jun 26 - Jul 02
  1. pawan kumarln

    498 Points

  2. akankshadewangan24

    404 Points

  3. Arjun

    286 Points

  4. Debashish Deka

    234 Points

  5. Abhisek Das

    230 Points


23,435 questions
30,153 answers
67,633 comments
28,503 users