Practice Count Days Without Meetings
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are given a positive integer days representing the total number of days an employee is available for work (starting from day 1). You are also given a 2D array meetings of size n where, meetings[i] = [start_i, end_i] represents the starting and ending days of meeting i (inclusive). Return the count of days when the employee is available for work but no meetings are scheduled. Note: The meetings may overlap.
Source: Count Days Without Meetings on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
days = 10, meetings = [[5,7],[1,3],[9,10]]
2
# Example 2
days = 5, meetings = [[2,4],[1,3]]
1
# Example 3
days = 6, meetings = [[1,6]]
0
Constraints
Related LeetCode Problems
Practice more problems similar to Count Days Without Meetings.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.