<span>Hello Pennstatealum </span><span>
Question: Binary search requires that the data to search be in order.
True or false
Answer: True
Hope This Helps
-Chris</span>
Answer:
You need an email and a job and to be over 18 for business ones or a legal gaurdian if you have none then ur hecced uwu :333
Answer:
The function in C++ is as follows:
int isSorted(int ar[], int n){
if ( || ){
return 1;}
if ( < ){
return 0;}
return isSorted(ar, n - 1);}
Explanation:
This defines the function
int isSorted(int ar[], int n){
This represents the base case; n = 1 or 0 will return 1 (i.e. the array is sorted)
if ( || ){
return 1;}
This checks if the current element is less than the previous array element; If yes, the array is not sorted
if ( < ){
return 0;}
This calls the function, recursively
return isSorted(ar, n - 1);
}