Amazon Interview Question

An easy leetcode question was asked