UCB interview question

None too difficult