Amazon Interview Question

Two leetcode questions (check description)