Pregunta de entrevista de Superhuman

A two pointer lc question