Loading problem…
You're building a calendar scheduling feature for a meeting room booking app. Users can book time slots, and you need to merge overlapping time slots to show consolidated availability and prevent double-booking.
Given an array of intervals where intervals[i] = [start_i, end_i], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.