samedi 25 mars 2017

Generate unique randoms when we cannot store previous generated randoms

We have an array (of strings for example). The size of this array is not fixed. Now, our machine, selects an element of this array every 3 minutes and shows us. The problem is we don't have a memory to store the elements we have picked before, and every 3 minutes when we select from this array we would like the elements to first cover up the whole array and then they are free to repeat, but they should not repeat before every element has been picked up once. We don't have memory to store the elements picked but we can get the MinutesInDay variable (how many minutes have passed in the day). I believe something could be done using this variable. I am confused and been coding since 6 hours and just now came across this hurdle, please help.




Aucun commentaire:

Enregistrer un commentaire