lundi 5 décembre 2016

How to create a sequence of integers in Java with each digit occuring equally often without triples?

I need to create a large random sequence of integers (0-9). With large I mean longer than 300. And I need every number from 0 to 9 to occur exactly 30 times.

Now I want to avoid that a number appears more than twice or thrice in a row.

E.g. I don't want a sub-sequence like 123333456.

Can you help me with that?




Aucun commentaire:

Enregistrer un commentaire