Amazon Interview Question

I cannot remember but it was LeetCode easy-medium