Permutations of a string
CodeChefOpen on judge ↗
Print all the permutations of a string. (Note: If the occurrence of any letter is more than once than a word can occur more than once) ###Input: - The single line contains string input ###Output: n lines contain output strings one in each line ###Constraints - $0 \leq length of string \leq 4$ ###Sample Input: - ABCD ###Sample Output: ABCD ABDC ACBD ACDB ADCB ADBC BACD
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start