3
GENERATE all possible combinations of 15 elements from an array of 17 items. This is a hypothetical situation. Should serve for any combination n per p.
A total of 136 combinations. Using the Mathematical Formula for Combinations:
Cn,p
C17,15 = 17!/(15!*2!)
???? how to do it? suggestions, examples?
//Código
//array com 17 dezenas
dezenas = ["2", "4", "5", "6", "7", "9", "10", "12", "15", "16", "18", "20", "21", "22", "23", "24", "25"];
//Gerar todas combinações possíveis de array com 15 dezenas
array1 = ["2", "4", "5", "6", "7", "9", "10", "12", "15", "16", "18", "20", "21", "22", "23"];
array2 = ["2", "4", "5", "6", "7", "9", "10", "12", "15", "16", "18", "20", "21", "22", "24"];
//etc... etc...
I edited the answer with the complement.
– user60252