Arc Technologies Interview Question

leetcode language agnostic coding problem