oop - Efficiently: Random numbers in fixed range without repetitions -
O people, I know there are one million questions on random numbers, but in fact I searched a lot but due to this I could not find anything like mine - it does not mean that there is not in it in any case, please forgive me if I am repeating any question, then just tell me that this is the case.
So, I want to do something simple in the easiest way.
I randomly generate all the I know, I can do this by putting everything in the Any better / sharp thoughts? You can only make one alteration, and then take action through the list. N integers in the range as
[0, n] , one by one, such a repetition is not.
list , rotate it, get head, and then remove head from the list. But then I will change the length of my list to
N ,
N-1 .
Comments
Post a Comment