GEICO Interview Question

2 Leetcode mediums in an hour of time.