Lutron Eletronics interview question

Technical Question - solved using hashmap/set