Cleartrip interview question

Data structures