Pregunta de entrevista de Amazon

Just a basic question from Cracking the Coding Interview