Google interview question

I only did the coding test.