Pergunta de entrevista da empresa Apple

nothing was overly complicated.