Infosys interview question

Asked me to write the code which is trigger