Yelp interview question

a leetcode easy in 45 minutes