Philips interview question

Ques - Simple interview question - Based on string - reverse the string without reversing the words - Based on Set - Given a string , also a pattern was given, I had to tell the number of unique strings I can generate following the pattern