Capital One interview question

Technical 1: Solve a leetcode easy type problem.