Zalando interview question

Write code that merges a list of intervals