Problem

Given a string, find all permutations

Example

The string ABC will have the following permutations

ABC ACB BAC BCA CBA CAB

Backtracking approach