Given a string, print all permutations of the string by putting spaces between characters. The first character remains fixed.
{
"s": "ABC"
}[
"A B C",
"A BC",
"AB C",
"ABC"
]{
"s": "AB"
}[
"A B",
"AB"
]{
"s": "A"
}[
"A"
]Sign in to Run Code and Submit