Talk:Generate random numbers without repeating a value

From Rosetta Code

Why not use shuffle

Knuth_shuffle

That's what I'd do in practice though the task is to generate the random numbers individually without repetition so that's what I've done. --PureFox (talk) 17:58, 24 August 2021 (UTC)
There are times you have to read between the lines: in this case what was asked for is almost certainly not what was actually wanted. I placed more emphasis on the "Try your best not to make the process take too long at runtime." part, which to me means not generating/testing/discarding potentially thousands of numbers, and instinctively used shuffle() as you suggest, more in line with the Julia, Raku, and REXX entries. --Pete Lomax (talk) 03:06, 26 August 2021 (UTC)