Optum Interview Question

How i answered the coding challenge