Yelp Interview Question

Trasverse graph algorithm question for the first interview.