2 ms·
Nice. A pity it requires knowing sizes in advance. I wonder... Could you do something similar "afterwards"?
by TheLoneWolfling 12y ago
Nice.
A pity it requires knowing sizes in advance. I wonder... Could you do something similar "afterwards"?
- mark-r 12y agoSure you can, I used a short program myself to calculate the best case outcomes. The question is whether it would be worth the bother. Usually the range you request is much smaller than the range of your random number generator, so the number of regenerations required are nowhere near the worst case - and the cost of generating a random number isn't enough to get worried about.