AirAsia interview question

Data structure question