mercredi 22 juillet 2020

How could you randomly exclude/delete elements from an array that satisfy some condition?

For example, if I had a 1x100 array, and it contained 90 0's, I'd like to somehow exclude 80 of those 0's chosen at random. I've been struggling with this problem for a while and I've made very little progress unfortunately.




Aucun commentaire:

Enregistrer un commentaire