Pregunta de entrevista de Infosys

Easy leet code question on two pointer and arrays