Apple interview question

nothing was overly complicated.