Infosys interview question

Easy leet code question on two pointer and arrays