Amazon interview question

A string question related to string concatenation