Infosys interview question

Array Coding Question using Two-Sum