+ 2
Find unique random numbers - I'm stuck , Please Help!
Hello fellow coders, I want to generate n random unique numbers from 1-10. With my code, I can generate random numbers from 1-10, but they're not unique and gets repeated. Could you help me with the logic, Thanks! https://code.sololearn.com/Wqy0boM0iMgK
2 Antworten
+ 2
I have just found this one: http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html I think it is good one
0
so its like if the number is duplicate then search for other random ?