Google interview question

One string and one array problem.