Apple Interview Question

nothing was overly complicated.