Google interview question

It's related to String processing