Skip to content

Instantly share code, notes, and snippets.

@anarcher
Created September 7, 2010 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anarcher/567770 to your computer and use it in GitHub Desktop.
Save anarcher/567770 to your computer and use it in GitHub Desktop.
Quiz
임의의 알파벳 시퀀스를 입력받아서, 해당 알파벳으로 만들 수 있는 순서의 조합을 모두 구한다.
결과는 문자열의 오름차순으로 정렬하려 출력한다. 예를 들어, "AB", "BA" 가 있는 경우 "AB"가 "BA"보다 먼저 나와야 한다.
ex)
"ABC" -> "ABC", "ACB", "BAC", "BCA", "CAB", "CBA"
"AAB" -> "AAB", "ABA", "BAA"
"ABA" -> "AAB", "ABA", "BAA"
"000" -> "000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment