Pregunta de entrevista de Squarepoint Capital

Cannot remember but definitely a question on Leetcode