title: What's the order/recurrence formula/closed formula of this recursive algorithm?
body: <p>I have an algorithm called rec(n):</p>
  
  <pre><code>rec(n)
  if (n=0) return 1
  else 
      i=rec(n-1)
      A[n]=i
      return i
  </code></pre>
  
  <p>I was looking at it, and from what I can see it seems like no matter what you put in there it'll always return a value of 0, so I assumed that the recurrence relation would be a(n)=a(n-1) and the time complexity would be constant (i.e. O(1)), but I'm hesitant about my interpretation of it. Could anyone help me out?  </p>