A Ariyawat Juprang New member Aug 25, 2021 #1 What is the recurrence relation for the linear search recursive algorithm? A. T(n-2)+c B. 2T(n-1)+c C. T(n-1)+c D. T(n+1)+c

What is the recurrence relation for the linear search recursive algorithm? A. T(n-2)+c B. 2T(n-1)+c C. T(n-1)+c D. T(n+1)+c

C Chris Lee New member Aug 25, 2021 #2 Answer: C Explanation: After each call in the recursive algorithm, the size of n is reduced by 1. Therefore the optimal solution is T(n-1)+c. Upvote 0 Downvote

Answer: C Explanation: After each call in the recursive algorithm, the size of n is reduced by 1. Therefore the optimal solution is T(n-1)+c.