Domanda di colloquio di Sahl

Hard/medium common problem from leetcode