Groupon interview question

some algorithm problems