Pregunta de entrevista de Moovit

leetcode question about data structures