Pergunta de entrevista da empresa Shopee

Merge range problem, similar to the one on leetcode