SUATI Interview Question

They ask for an algorithm to permut a string.