Amdocs interview question

String manipulations.