Pregunta de entrevista de Shopee

Merge range problem, similar to the one on leetcode