Interview question
Merge intervals and discuss time/space complexity
Asked in Goldman Sachs Switzerland Data Engineer interviews
Asked by
40% candidates
Difficulty
Medium
Round
Technical Round
AI synthesized from candidate reports
Question 2 of 4
Merge intervals and discuss time/space complexity
Medium59% Candidate ReportsCODINGGoldman Sachs SwitzerlandData Engineer
Question
Merge intervals and discuss time/space complexity
High-Level Approach
Sort, iterate, extend last if overlap else push.