AirFi interview question

One code was asked to write using data structure.