Aspire Systems interview question

String Manipulations, patterns, puzzles