1 write a function that will merge the contents of two sorted ascending order arrays 5346972

1.                  Write a function that will merge the contents of two sorted(ascending order) arrays of type double values, storing the resultin an array output parameter (still in ascending order). Thefunction should not assume that both its input parameter arrays arethe same length but can assume that one array does not contain twocopies of the same value. The result array should also contain noduplicate values. As an example, the two arrays and the resultingmerged array may look like the following:

First array:

-10.5

-1.8

3.5

6.3

7.2

Second array:

-1.8

3.1

6.3

empty

empty

Merged array:

-10.5

-1.8

3.1

3.5

6.3

7.2

Note: when one of the input arrays has been exhausted, do notforget to copy the remaining data in the other array into theresult array. Test your function with cases in which (1) the firstarray is exhausted first, and (2) the second array is exhaustedfirst. Remember that the arrays input to this function must alreadybe sorted.

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now