Amazon Interview Question

Easy leetcode question was asked