Amazon interview question

They asked a string question