title: Big-O notation of an algorithm that runs max(n,0) times?
body: <p>I have the following algorithm:</p>
  <pre><code>for(int i = 1; i &lt; n; i++)
      for(int j = 0; j &lt; i; j++)
          if(j % i == 0) System.out.println(i + &quot; &quot; + j);
  </code></pre>
  <p>This will run <code>max(n,0)</code> times.</p>
  <p>Would the Big-O notation be <code>O(n)</code>? If not, what is it and why?</p>
  <p>Thank you.</p>