Groupon interview question

Simple algorithmic questions including optimization