in DS edited by
523 views
0 votes
0 votes

Consider the following function:

Find(Element Type X,List L)
{  
    Position Prev_Pos,XPos;
    Prev_Pos=Find Previous(X,L);
    if(Prev_Pos--->Next!=NULL)  /* found */
     {   
       XPos=Prev_Pos--->Next;
       Prev_Pos---->Next=XPos--->Next;
       XPos--->Next=L--->Next;
       L--->Next=XPos;
       return XPos;
     }
 
    else
       return NULL;

"Find Previous" function finds the position of a previous number of $X.$Above procedure is
$A)$Linked list implementation of self-adjusting lists
$B)$Linked list implementation of singly linked lists
$C)$Linked list implementation of doubly linked lists
$D)$None of these

in DS edited by
523 views

3 Comments

if(Previous--->Next!=NULL)  /* found */

Can you please check this line?

0
0

i edited the question.... But options are not matching. and i have doubt that

what is the meaning of 

 

A)Linked list implementation of self-adjusting lists 

0
0
Thank you brother, I also have a problem in syntax, but you edit, so I can understand

Option (A) is correct

what is the basic approach?so i can understand easily
0
0

Please log in or register to answer this question.

Related questions