Array-based member function of the unsorted list adt


Discuss the below:

An Unsorted Type ADT is to be extended by the addition of function

SplitLists, which has the following specifications:

SplitLists(UnsortedType list, ItemType item, UnsortedType& list1, UnsortedType& list2)

Function: Divides list into two lists according to the key of item.

Preconditions: list has been initialized and is notempty.

Postconditions: list1 contains all the items of list whose keys are less than or equal to item's key; list2 contains all the items of list whose keys are greater than item's key.

a. Implement SplitLists as an array-based member function of the Unsorted List ADT.

b. Implement SplitLists as a linked member function of the Unsorted List

 

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Array-based member function of the unsorted list adt
Reference No:- TGS01936532

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)