Question: the other examples are giving error on this portion ( int L [ n 1 ] , R [ n 2 ] ; ) please

the other examples are giving error on this portion (int L[n1], R[n2];) please fix. Thank you Problem 3: Implement a Recursive Merge Sort Function (20
points)
Write a program which implements a recursive merge sort function. An example can be
found in the textbook or on the internet.
Write an is.increasing() function that ensures that each value in an array is non-strictly
increasing. This means that at a given index n, the value at index n+1 is greater than
or equal to the value at n. Return true if this property holds, false otherwise. Use this
header:
bool is.increasing(int* values, int size)
Create an array of 100 random integer values. Call the is.increasing() function which
should return false.
Call the merge sort function and pass it the array of integers. Call the is.increasing()
function again; it should return true.
For example: Assume an array is 4,8,2,4,1,9. Calling is increasing should return
false because the value at index 2 is less than the value at index 1. After sorting the
array is 1,2,4,4,8,9 and calling the is.increasing function should return true
because each value is not less than its predecessor.
Note: the term non-strictly increasing means that two adjacent values may be equal;
strictly increasing means that the right-most value is greater than the left-most value of
the two. For random values, it is almost certain that duplicated values will exist.
Design, edit, run, test, and debug your program. Enter the completed C++ code here:
C++ code for the lab projects.
 the other examples are giving error on this portion (int L[n1],

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!