1.Recurrence relation for time complexity
will be T(n)=2T(n/4)+Root(n)
Because complexity of the loop is root(n)
By using case 2 of master theorem we have T(n)=theta(root(n)logn).
2.Recurrence relation for return value
T(n)=2T(n/4)+Root(n)*n
because the function return value 2 time fun(n/4)+root(n)*n
by solving using case 3 of master theorem we have solution of recurrence is theta(root(n)*n)
3.Recurrence relation for no of calls
T(n)=2T(n/4)+1
by solving using case 1 of master theorem we have solution of recurrence is theta(root(n))
Correct me if i am wrong somewhere.