Flexport interview question

Standard Medium/Easy Leetcode