athenahealth Interview Question

Q: Leetcode medium difficulty, not too difficult