Groupon interview question

A hard data struct related problem and some easy questions