![]() |
random generator for unique numbers
Hi
I have an issue ,trying to build a unique number generator. Specifiacally, the generator is this Code:
Random randomPerson=new Random(System.nanoTime());When this program is executed, I either take the aprropriate output, or the program stucks (infinite loop). Is there any possibility to fix this infinite loop? Thanks in advace! |
Re: random generator for unique numbers
Presumably you mean something like this:
Code:
bool is_unique( int n) { |
Re: random generator for unique numbers
Thanks!
|
| All times are GMT +5.5. The time now is 06:53. |