Pergunta de entrevista da empresa Infosys

Easy leet code question on two pointer and arrays