순열 문제

순열/조합 (Permutation / Combination)
1. Combination (조합) 조합 : 순서 없이 n개 중에 r개를 뽑는 것 예) 10C3 = 1098 / 321 = 120 nCr = nCn-r이므로 10C3 = 10C7 const getCombinations = (array, selectNumber) => { const results = []; if(selectNumber === 1){ return array.map((element) => [element]); } array.forEach((fixed, index, origin) => { const rest = origin.slice(index+1); const combinations = getCombinations(rest, selectNumber - 1); const attached = co..