Merge Overlapping Closed Intervals
Company: ByteDance
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Overview: Implement `merge_intervals(intervals)` for closed intervals. Work through the function contract, boundary cases, correctness argument, and time and space complexity expected in a production-quality solution.