Groupon interview question

Tree Data Structure