Bloomberg Interview Question

String manipulation problem in any language