title: What is the (worst-case) time analysis for the following loop?
body: <p><strong>Here is some code for an integer variable n:</strong></p>
  
  <pre><code>while (n &gt; 0)     
      {         
          n = n/10; // Use integer division     
      } 
  </code></pre>
  
  <p>I am trying to find the worst-case time analysis for this loop. O(n) is new to me and I am having difficulty with it.  Wouldn't this just be O(n)?</p>