Infosys interview question

Trigger best practice