Google interview question

Basic string and array questions.