Pregunta de entrevista de Squarepoint Capital

Easy level Leetcode style question