title: finding time complexity of an algorithm
body: <p>I am trying to find big Theta of the following code:</p>
  
  <pre><code>k=0,x=0,y=0
  for i=1 to 2n do:
      for j=0 to i^2 do:
          k+=1
      t=k
      while t&gt;=0 do:
          ...(O(1) operations)
          t=t-0.5
  </code></pre>
  
  <p>I understand that the first loop always runs at O(n)
  the second one is at most O((2n)^2) - when i=2n.
  and that the while runs 2n^2 ( is this correct?)</p>
  
  <p>so my calculation is : T(n) = O(n)*(O(n^2)+O(n^2)) = O(n^3)</p>
  
  <p>I am not sure whether I am correct and how can I find now the big Omega - to show it is equal to the Big O. </p>