FDM Group Interview Question

problem solving Interval merging question