title: Time complexity of while loop until list is empty?
body: <p>My pseudo code is currently constructed as:</p>
  <pre><code>WHILE list is not empty
     FOR item in list
        do stuff to find an item that matches certain criteria
     REMOVE matching item from list
  </code></pre>
  <p>I am having a hard time wrapping my mind about what the time complexity will be due to the fact that after each iteration the list will be getting smaller. Any thoughts? I thought o(n) since there is only 1 for loop per while iteration.</p>