Capital One interview question

Medium to Hard Leetcode Problems