Infosys interview question

1 code along with technical