Google interview question

Strings, algorithms etc