Question: Add a member function mergeList to the Singly Linked List-based implementation of the List ADT. The member function takes as input a List object (representing
Add a member function mergeList to the Singly Linked List-based implementation of the
List ADT. The member function takes as input a List object (representing the list of smaller size) as
parameter and appends it to the List object (representing the list of larger size) on which the function will
be called.
Consider largerIntegerList and smallerIntegerList to be the two List objects in the main function. The
main function should call largerIntegerList.mergeList(smallerIntegerList) and then print the contents of
the largerIntegerList using the IterativePrint( ) member function by calling
largerIntegerList.IterativePrint( ) from main. The mergeList member function will append the elements of
the smallerIntegerList to the end of the largerIntegerList. Use the Singly Linked List code for Question 2
attached in this project description
Modify the mergeList member function added to the Singly Linked List-based List class for Question 2 in such a way that you append only elements (from the smaller link list) that are not already in the larger link list. Feel free to create additional member functions to facilitate this. i need to answer using C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
