Infosys interview question

drop-down handling