Infosys Interview Question

Easy leet code question on two pointer and arrays