Big O of an infinite loop?
<p>Consider the following code:</p>

<pre><code>int value = 0;

while(getRandomNumber() != 1000) {
    value++;
}

return value;
</code></pre>

<p>What would be the Big O (worst case, best case and average case) of the above code?</p>