title: Big-O analysis for a loop
body: <p>I've got to analyze this loop, among others, and determine its running time using Big-O notation.</p>
  
  <pre><code>for ( int i = 0; i &lt; n; i += 4 )
      for ( int j = 0; j &lt; n; j++ )
          for ( int k = 1; k &lt; j*j; k *= 2 )`
  </code></pre>
  
  <p>Here's what I have so far: </p>
  
  <pre><code>for ( int i = 0; i &lt; n; i += 4 ) = n
  </code></pre>
  
  <hr>
  
  <pre><code>for ( int j = 0; j &lt; n; j++ ) = n
  </code></pre>
  
  <hr>
  
  <pre><code>for ( int k = 1; k &lt; j*j; k *= 2 ) = log^2 n
  </code></pre>
  
  <p>Now the problem I'm coming to is the final running time of the loop. My best guess is O(n^2), however I am uncertain if this correct. Can anyone help?</p>
  
  <p>Edit: sorry about the Oh -> O thing. My textbook uses "Big-Oh"</p>