Question: 2. (20 Points) Using only the List ADT operations defined in the project description for pal, write a client function with the heading ListFind(ListL,intx) Your

 2. (20 Points) Using only the List ADT operations defined in
the project description for pal, write a client function with the heading

2. (20 Points) Using only the List ADT operations defined in the project description for pal, write a client function with the heading ListFind(ListL,intx) Your function will return a new List consisting of all index positions within L at which the element x is located. For instance, if L=[1,5,1,6,4,1,3,1,2] and x=1, then FindO will return the List [0,2,5,7]. If x is not contained in the argument List L, then Find O will return an empty List. FindO will make no changes to the state of its argument L, and has no preconditions. List ADT operations (pa1): List newList (void); void freeList (List* pL); int length (List L); int index(List L); int front (List L); int back (List L); int get (List L); bool equals (List A, List B); void clear (List L); void set(List L, int x); void moveFront (List L); void moveBack (List L); void movePrev(List L); void moveNext (List L); void prepend (List L, int x); void append (List L, int x); void insertBefore (List L, int x); void insertAfter (List L, int x ); void deleteFront (List L); void deleteBack (List L); void delete (List L); List copyList (List L)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!