I had a phone screen today and the question was a merge interval (similar to LC #56). I performed very bad. Just wanted to share the type of question so others can use. I rephrased the problem (using gpt), so to have no collision with google NDA.
Gaps on a Half-Line (short)
Input: N, then N lines of c r.
Each pair blocks the closed interval on .
Output all maximal uncovered gaps in increasing order as a b; use -1 for .
Notes: intervals are closed (touching ⇒ no gap); blocks may start < 0; include the gap from 0 if any.
Comments (6)


