You have a server and your server usually has busy periods and idle periods. From the server logs you have created a list of intervals during which the server was busy. Unfortunately, you realise that this list is not accurate and you had missed some intervals. Write code to merge these new intervalsInput
Existing Intervals [1, 2] [4, 7] [11, 13] [15, 21] Missing Intervals [3, 4] [5,12] [23, 25] Merged Output [1, 2] [3,13] [15, 21] [23, 25]