Amazon interview question

Amazon Leadership Principles 2 problems Leetcode Medium difficulty