Optum Interview Question

some leetcode question that is not too hard