I have put ??? where I need the answers. Thanks for ANY help. int new_largest(co
ID: 3616472 • Letter: I
Question
I have put ??? where I need the answers.Thanks for ANY help.
int new_largest(const int list[], int lowerIndex, intupperIndex)
{
int max1, max2, half_items;
if (lowerIndex == upperIndex)
return list[lowerIndex];
half_items = (upperIndex - lowerIndex + 1) / 2;
max1 = new_largest(list, lowerIndex, lowerIndex +half_items-1);
max2 = new_largest(list, lowerIndex + half_items,upperIndex);
if (max1 > max2)
return max1;
else
returnmax2;
}
Function largest() is invoked ??? times when largest(list, 0, 7) isexecuted,
whereas function new_largest() is invoked ??? times whennew_largest(list, 0, 7) is executed.
Max recursion depth reached while computing largest(list, 0, 63) is???,
whereas max recursion depth reached while computingnew_largest(list, 0, 63) is ???.