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

Related questions

0 votes
1 answer
1
asked in DS by iarnav Active (2.5k points)   | 77 views
0 votes
2 answers
2
asked in DS by smartmeet Loyal (3.3k points)   | 424 views
0 votes
1 answer
3
asked in DS by smartmeet Loyal (3.3k points)   | 63 views


Top Users Aug 2017
  1. Bikram

    5388 Points

  2. ABKUNDAN

    4730 Points

  3. manu00x

    3582 Points

  4. akash.dinkar12

    3534 Points

  5. rahul sharma 5

    3196 Points

  6. makhdoom ghaya

    2710 Points

  7. just_bhavana

    2432 Points

  8. stblue

    2244 Points

  9. Tesla!

    2126 Points

  10. pawan kumarln

    1914 Points


25,076 questions
32,240 answers
75,170 comments
30,249 users