Rally Health interview question

Easy Leetcode question