mercredi 13 juin 2018

Sample without replacement in golang

What's the best way to sample without replacement from a slice in golang?

a := make([]int, 100)
for i := range a {
    a[i] = i
}

# TODO sample 5 elements from a without replacement.




Aucun commentaire:

Enregistrer un commentaire