Solved

The Following Code Is an Example of a __________ Recursive \quad

Question 26

Multiple Choice

The following code is an example of a __________ recursive algorithm. int myRecursion(int array[], int first, int last, int val)
{
int num;
if (first > last)
\quad return -1;
num = (first + last) /2;
if (array[num] == val)
\quad return num;
if (array[num] < val)
\quad return myRecursion(array, num + 1, last, val) ;
else
\quad return myRecursion(array, first, num - 1, val) ;
}


A) Towers of Hanoi
B) QuickSort
C) binary search
D) doubly linked list
E) None of these

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents