Question: 1. Write a function that will merge the contents of two sorted (ascending order) arrays of type double values, storing the result in an array
1. Write a function that will merge the contents of two sorted (ascending order) arrays of type double values, storing the result in an array output parameter (still in ascending order). The function shouldn't assume that both its input parameter arrays are the same length but can assume 560 CHAPTER 9 Data Structures: Arrays and Structs that one array doesn't contain two copies of the same value. The result array should also contain no duplicate values. (Hint: When one of the input arrays has been exhausted, don't forget to copy the remaining data in the other array into the result array.) Test your function with cases in which (1) the first array is exhausted first, (2) the second array is exhausted first, and (3) the two arrays are exhausted at the same time (that is, they end with the same value). Remember that the arrays input to this function must already be sorted
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
