Apple interview question

Nothing very difficult