Apple Interview Question

Nothing particularly difficult