Data Structures
Meeting Rooms (Can Attend All Meetings)
Meeting Rooms (LeetCode 252): sort meetings by start and check that none overlaps the previous one. O(n log n), Python/Java/C++.
3 notes tagged
Meeting Rooms (LeetCode 252): sort meetings by start and check that none overlaps the previous one. O(n log n), Python/Java/C++.
Merge Intervals (LeetCode 56): sort by start, then merge overlapping intervals in one pass. O(n log n), with Python, Java and C++ code.
Find Right Interval (LeetCode 436): sort interval starts and binary-search the smallest start >= each interval end, O(n log n).