Domanda di colloquio di Pragmatic Play

Task from leetcode (easy level)