title: Setting up recurrence relation
body: <p>I am given this question:</p>
  
  <pre class="lang-none prettyprint-override"><code>Algorithm Mystery1(A[0...n-1])
  //Input: An array A[0...n-1] of n real numbers
  if (n = 1) return A[0]
  else temp = Mystery1(A[0...n-2])
    if temp &lt;= A[n - 1] return temp
    else return A[n - 1]
  </code></pre>
  
  
  
  <p>(a) What does this algorithm compute?<br>
  (b) Set up and solve a recurrence relation for the number of times the algorithm’s basic operation
  is executed.</p>
  
  <p>For part (a) I know that this algorithm computes the smallest element in an array. For part (b), I believe that the basic operation is a comparison, since it will be done the most amount of times, but i can't figure out how to set up the recurrence relation.<br> 
  I understand how to solve a recurrence relation, i just need help setting up the problem.</p>