Question: (20 Points) Using only the List ADT operations defined in the project description for pal, write a client function with the heading ListShuffle(ListA,ListB) Your function

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

(20 Points) Using only the List ADT operations defined in the project description for pal, write a client function with the heading ListShuffle(ListA,ListB) Your function will return a newly allocated List containing the elements of Lists A and B, shuffled together, one from A, then one from B, alternating between the two. If one of the Lists is exhausted before the other, then continue adding from the longer List, so that the returned List contains all elements from both A and B. For instance, if A=[1,2,3] and B=[4,5,6,7,8] then Shuffle O will return the List [1,4,2,5,3,6,7,8]. ShuffleO will make no changes to the states of its two arguments A and B. Shuffle O 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!