Pregunta de entrevista de Pragmatic Play

Task from leetcode (easy level)