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