70 / 75
E

Meeting Rooms

#70
arraysortingintervals

Sort intervals by start time, check if any meeting starts before previous ends.

Example:

Input:intervals=[[0,30],[5,10],[15,20]]
Output:false (overlap between [0,30] and [5,10])

Common Mistakes:

  • Not sorting intervals first
  • Wrong overlap condition (should be start < previous end)
  • Overcomplicating with sweep line when simple iteration suffices
  • Checking all pairs O(n²) instead of sorted O(n) scan

Notes:

Simple interval problem. Time O(n log n) for sorting, Space O(1) or O(n) depending on sort. Premium problem on LeetCode.

70/75
Meeting Rooms