3 ms·
On 1, you don’t really have to consolidate them just to check if the whole range is covered. You can just sort beginnings and ends together and then iterate ove
by kamil3141 4y ago
On 1, you don’t really have to consolidate them just to check if the whole range is covered. You can just sort beginnings and ends together and then iterate over them with some tmp variable to check that you always have at least one beginning “open” (n log n).