Pregunta de entrevista de Apple

Write a function that passes the tests below.