Amazon interview question

string manipulation questions