Pregunta de entrevista de think-cell

Programming task. Writing solution for interval map.