I have an array, articles, and it could be any length.
I need to generate n number pairings within the range 0...articles.length without repeating a pair, i.e. 1, 3, 2, 6, 1, 6, 8, 1, 10, 3 (in this example, articles.length == 10).
How can I do this with Ruby?
Aucun commentaire:
Enregistrer un commentaire