Question & Answer: Consider the following recursive function for n greaterthanorequalto 1: Algorithm 1 int recurseFunc (int n) If n…..

3. Recursive Program (30 points) Consider the following recursive function for n2 1 Algorithm 1 int recurseFunc(int n) If n 0, return 1 If n =-1. return i while i < n do while j< n do print (hi) j-j+1 end while end while int recurseFune(n/9) int b recurseFunc(n int c- recuseFun(n/9) return a+b+ (1) (24 points) Set up a runtime recurrence for the runtime T(n) of this algorithm.

Consider the following recursive function for n greaterthanorequalto 1: Algorithm 1 int recurseFunc (int n) If n == 0, return 1. If n == 1, return 1. i = 0 while i

Expert Answer

 

Answer for the given Question:

The run time complexity of given code is

a = o(n^2)

b = O(n^2)

c = O(n^2)

a+b+c = O(n^2) + O(n^2) + O(n^2) = 3 O(n^2) = O(n^2)

Still stressed from student homework?
Get quality assistance from academic writers!