Google Interview Question

Implement a data structure to support dynamic insertion, deletion of intervals. Overlapping intervals should be merged.