Question: Fill in the blanks to write a recurrence relation called RecSearch find a specific value x in a list of size n. You may assume
Fill in the blanks to write a recurrence relation called RecSearch find a specific value x in a list of size n. You may assume that the list in held in an array called A. Efficiency is not a concern. You must use recursion. The function should return an index (position) of the desired item. Do not make any assumptions about the nature of the list.
RecSearch(A,n,x) = ______________ if ________________= ________________ // _________________ >= 1 (can also index from zero) RecSearch(A,n,x) = ______________ // otherwise
Step by Step Solution
There are 3 Steps involved in it
The question is incomplete because it doesnt have enough context to provide the specific base case a... View full answer
Get step-by-step solutions from verified subject matter experts
