GEICO Interview Question

One leetcode medium in 60 minutes