The Gateway to Computer Science Excellence
0 votes
72 views

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 by Veteran (54.7k points)
edited by | 72 views
0
if(Previous--->Next!=NULL)  /* found */

Can you please check this line?

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

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,648 questions
56,429 answers
195,208 comments
99,921 users