Olive Interview Question

A leetcode easy problem, and a system design problem.