Given an array of meeting intervals where intervals[i] = [start_i, end_i]
, find the minimum number of days needed to schedule all meetings without conflicts.
Rules:
Constraints:
Examples:
// Example 1:
console.log(
minMeetingDays([
[0, 40],
[5, 10],
[15, 20],
]),
);
// Output: 2
// Explanation:
// Day 1: [0,40]
// Day 2: [5,10], [15,20]
// Example 2:
console.log(minMeetingDays([[4, 9]]));
// Output: 1
// Explanation: Only one day needed for one meeting