Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Let x and y be two vectors of integers arranged so that the elements are in asce

ID: 3575129 • Letter: L

Question

Let x and y be two vectors of integers arranged so that the elements are in ascending numerical order You are asked to write a function vector merge (vector p, vector g) so that the call merge(x, y) constructs a new vector out of the data values of x and K so that the e/emends of the new vector are the combined elements ot vectors p and q. the vector returned by the function should also in ascending numeric order. The function should not disturb the original vectors. You cannot use a sort function on the vector. The two input vectors are not necessarily the same length and one or both of x and y could be empty vectors. But... the vector class has a size() member function that returns its size. Write function merge corresponding to the requirements above.

Explanation / Answer

#include using namespace std; #include void merge(int *,int, int , int ); void mergesort(int *a, int low, int high) { int mid; if (low