Randomly generating sequence of ints in a specific range

Posted by vvv on Stack Overflow See other posts from Stack Overflow or by vvv
Published on 2010-03-31T10:06:57Z Indexed on 2010/03/31 10:13 UTC
Read the original article Hit count: 167

Filed under:
|
|
|
|

Hi, I am unsure how to put this and my math skills aren't that strong. But here's what I need.

I want to generate a list of all the 16bit integers (0-65535). But everytime I do so I want to seed the algorithm randomly that each time the list starts with a different integer and all the subsequent integers will be generated once but also in random order.

small example (1-5): ...

1, 5, 3, 2, 4

4, 3, 1, 5, 2

2, 1, 4, 5, 3 ...

Any help?

© Stack Overflow or respective owner

Related posts about random

Related posts about sequence