
Insert Interval is O(n) not O(n log n) because the input is pre-sorted. three cases: before (pass through), overlap (expand), after (output insert, swap current in). that swap is why out.add(insert) always works at the end. firecode.io/firelogs/probl…
English
