Question: Write it in C++ please 1. Write a RECURSIVE function to look for a target key in a list (array) of integer numbers. Code the
Write it in C++ please

1. Write a RECURSIVE function to look for a target key in a list (array) of integer numbers. Code the function in C++/ Java ONLY. (No points for a non-recursive function) 2. Analyze the time complexity of your function in part (a). To analyze, you should write its recurrence relation first and explain it. Then solve the recurrence relation and come up with the final function of n in closed form (Hint: the function of n that has no sigmas, recursive calls of the functions, etc.) Hint: For example, f(n)=2f(n/2)+2n2+2 is NOT in its closed form. But something like f(n)=2n3+4 is in closed form. 3. Use the function you got in part b and express that in Big-O() for the worst-case time complexity of your search function. (Hint: For our clarifying example above where f(n)=2n3+4, we say f(n)=O(n3) and explain why that's our answer... )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
