Olive interview question

A leetcode easy problem, and a system design problem.