Pregunta de entrevista de Grailed

Collaborative DSA problem in Swift