Amazon interview question

Stack-based, sets and hashmap based and one design