On November 9, 1989, a significant moment marked the fall of the Berlin Wall, a historic event symbolizing the dismantling of barriers. Today, you will tackle a different kind of barrier – the challenge of generating all permutations of a given string using recursion.
Write a recursive function that takes a string as input and returns a list (or array) of all possible permutations of that string. The order of permutations in the output does not matter. Assume that the input string contains unique characters.
For the input 'abc'
, possible outputs include:
[ "abc", "acb", "bac", "bca", "cab", "cba" ]
Below is some starter code in multiple languages to help you get started.