Yelp interview question

Just general coding part.