Abrigo interview question

string manipulation question