Amazon interview question

Just a basic question from Cracking the Coding Interview