J.P. Morgan Interview Question

String manipulation based on the number of characters in the String.