Branch interview question

String manipulation