Amazon interview question

An easy leetcode question was asked