Pregunta de entrevista de UKG

leetcode easy question, mostly using lists and linkedlists