title: Order of growth of the following code?
body: <p>I have being given the following question and can't decide the right answer:</p>
  
  <pre><code>for (int i=1; i&lt;=n/2; i++)
    for(int j=i; j&lt;=n-i;j++)
      for(int k=i;k&lt;=j;k++)
        x++;
  </code></pre>
  
  <p>What's the order of growth of the x as a function of n?</p>
  
  <ol>
  <li>Ω(n^3).</li>
  <li>Θ(n^2.5)</li>
  <li>Θ(n^2)</li>
  <li>Ο(nlogn)</li>
  <li>none of the above</li>
  </ol>
  
  <p>I managed to figure out that:</p>
  
  <pre><code>T(n) = n*(n-1) + T(n-2)
  </code></pre>
  
  <p>but this doesn't really help me figure out the order of growth.
  maybe there is a better way of finding it?</p>