Infosys interview question

Apex best practices