RetailMeNot interview question

Data structure / Algo centric question