Domanda di colloquio di UKG

leetcode easy question, mostly using lists and linkedlists