순열: 순서에 상관있게 값들을 나열
algorithm
✏️ 모든 순열 구하는 예시
sort(v.begin(),v.end());
do {
for (int i = 0; i < len; i++) {
cout << v[i] << " ";
}
cout << endl;
} while (next_permutation(v.begin(), v.end()));
next_permutation(시작 주소, 종료 주소)
permutation
하거나 적절한 permutation
방식 선택해서 사용하면 됨next_permutation
대신 prev_permutation
사용❗️ next_permutation
사용시 오름차순 정렬 필수!