Generate string permutations · Compiler
Generate string permutations
Arrange all the letters of a word in every possible order, using each letter exactly once per arrangement.
- Input
- One word of 1 to 6 distinct uppercase ASCII letters.
- Output
- Print one arrangement per line in alphabetical (lexicographic) order, comparing letters from left to right with A first and Z last.
Compiler Explorer runs your code when you run or check it.
Loading your exercise draft…