Write the following function that merges two sorted lists into a new sorted list:
void merge(const int list1[], int size1, const int list2[], int size2, int list3[])
Implement the function in a way that takes size1 + size2 comparisons. Write a test program that prompts the user to enter two sorted lists and display the merged list. Here is a sample run. Note that the first number in the input indicates the number of the elements in the list. This number is not part of the list. Assume the maximum list size is 80.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here