Pergunta de entrevista da empresa think-cell

Programming task. Writing solution for interval map.