Meta interview question

Leetcode medium difficulty problem about intervals.