Groupon Interview Question

Simple algorithmic questions including optimization