Question: Question 1 [40 points] Below is a recursive algorithm for finding a min in a list. See requirements folder for the Python code given for

 Question 1 [40 points] Below is a recursive algorithm for finding

Question 1 [40 points] Below is a recursive algorithm for finding a min in a list. See requirements folder for the Python code given for this function. def minl(A,n): if n=0 : return A[0] m=min1( A, n-1) if m>A [n]:return A [n] else: returnm a) [10 points] [No partial credit, base case and general case must be accurate] Write its recurrence equation. When writing the equation make sure to specify its base case(s) and the general case. See below for an example of a recurrence equation to help you write the recurrence for minl algorithm 0ifn=0 Base case T(n) General case b) [30 points] Solve the recurrence equation for min1 algorithm using iteration, Big Oh notation will suffice I.[10 points, no partial credit] Please note that when using iteration, go at least 2 steps to show us your work, less than 2 steps will result in 0 points. II. 10 pointsl Show us clearly how you identified its pattern III. [10 points, no partial credit, equation must be solved accurately] Once you identify the pattern then try to bring it to base case and solve it. (See class notes for examples)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!