title: Complexity of algorithm in Big O notation
body: <p>Consider the following code snippet:</p>
  
  <pre><code>for(int index = 1;index &lt; N;index*=2){
      int counter = 0;
      while(counter &lt; N){
         counter++;
      }
  }
  </code></pre>
  
  <p>Determine its best - and worst - case runtime in the Big Theta notation as a function of N.
  Options:</p>
  
  <p>a) Best case: O(log(N)) - Worst case: O(N²)</p>
  
  <p>b) Best case: O(N . log(N)) - Worst case: O(N . log(N))</p>
  
  <p>c) Best case: O(N . log(N)) - Worst case: O(N²)</p>
  
  <p>d) Best case: O(N) - Worst case: O(N)</p>
  
  <p>I saw this question in a Java assessment and I really don't know the right answer.
  I answered the option D, but I don't know if it is right.
  Could you help me with that?</p>