Google interview question

this is how we do it