Yelp Interview Question

A basic tree traversal algorithm question.