Implement Interval Insert and Dedup | Bytedance Interview Question