Google interview question

I was requested to write some code on a board