Domanda di colloquio di Amazon

Just a basic question from Cracking the Coding Interview