Domanda di colloquio di Rafael

they gave me a leetcode problem to solve