Question: What is the recurrence relation for the given code below? private static void function _ foo ( int [ ] a , int i ,
What is the recurrence relation for the given code below?
private static void functionfooint a int i int j
if i j return;
int mid i j;
int k rand; this is a constant time operation that can be considered as
functionfoo a i mid; inputs the left half of the original array a
functionfoo a mid j; inputs the right half of the original array a
a Tn Tn n;
b Tn Tn;
c Tn Tn;
d Tn n log n ;
e Tn Tn n;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
