Pregunta de entrevista de Microsoft

A problem based on 2 pointers