title: Algorithm complexity Min and max
body: <p>I have a question..I got an algorithm</p>
  
  <pre><code>procedure summation(A[1...n])
  s=0
  for i= 1 to n do
       j=min{max{i,A[i],n^3}
       s= s + j
  return s
  </code></pre>
  
  <p>And I want to find the min and max output at this algorithm with the use of asymptotic notation θ. 
  Any ideas on how to do that?
  What I have to look on an algorithm to understand it's complexity?</p>