Google interview question

you need to know basic understanding of time complexities.