|
|
|
|
|
by emilv
4557 days ago
|
|
> the PRNG will walk the number space Are you sure? What if there's an infinite amount of tries to get to a certain number? You can of course reason about the average case, but maybe the worst case (when there's an input number which is never found by the PRNG) does never halt. > O(rand) For sorting algorithms we usually compare in the number of input elements. You can reason about the average case where the numbers are found in average time so you can consider the number of iterations to find the correct number a constant (a very large constant but a constant nonetheless). |
|