Google interview question

Manipulating strings in a datastructure