Yelp Interview Question

A basic combinatorics algorithm question.