Optum interview question

some leetcode question that is not too hard