Pregunta de entrevista de Nielsen

2 pointer based dsa question