Skip to content

Commit e2ad3ee

Browse files
committed
Create README - LeetHub
1 parent 317f849 commit e2ad3ee

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<h2><a href="https://leetcode.com/problems/count-days-without-meetings">3169. Count Days Without Meetings</a></h2><h3>Medium</h3><hr><p>You are given a positive integer <code>days</code> representing the total number of days an employee is available for work (starting from day 1). You are also given a 2D array <code>meetings</code> of size <code>n</code> where, <code>meetings[i] = [start_i, end_i]</code> represents the starting and ending days of meeting <code>i</code> (inclusive).</p>
2+
3+
<p>Return the count of days when the employee is available for work but no meetings are scheduled.</p>
4+
5+
<p><strong>Note: </strong>The meetings may overlap.</p>
6+
7+
<p>&nbsp;</p>
8+
<p><strong class="example">Example 1:</strong></p>
9+
10+
<div class="example-block">
11+
<p><strong>Input:</strong> <span class="example-io">days = 10, meetings = [[5,7],[1,3],[9,10]]</span></p>
12+
13+
<p><strong>Output:</strong> <span class="example-io">2</span></p>
14+
15+
<p><strong>Explanation:</strong></p>
16+
17+
<p>There is no meeting scheduled on the 4<sup>th</sup> and 8<sup>th</sup> days.</p>
18+
</div>
19+
20+
<p><strong class="example">Example 2:</strong></p>
21+
22+
<div class="example-block">
23+
<p><strong>Input:</strong> <span class="example-io">days = 5, meetings = [[2,4],[1,3]]</span></p>
24+
25+
<p><strong>Output:</strong> <span class="example-io">1</span></p>
26+
27+
<p><strong>Explanation:</strong></p>
28+
29+
<p>There is no meeting scheduled on the 5<sup>th </sup>day.</p>
30+
</div>
31+
32+
<p><strong class="example">Example 3:</strong></p>
33+
34+
<div class="example-block">
35+
<p><strong>Input:</strong> <span class="example-io">days = 6, meetings = [[1,6]]</span></p>
36+
37+
<p><strong>Output:</strong> 0</p>
38+
39+
<p><strong>Explanation:</strong></p>
40+
41+
<p>Meetings are scheduled for all working days.</p>
42+
</div>
43+
44+
<p>&nbsp;</p>
45+
<p><strong>Constraints:</strong></p>
46+
47+
<ul>
48+
<li><code>1 &lt;= days &lt;= 10<sup>9</sup></code></li>
49+
<li><code>1 &lt;= meetings.length &lt;= 10<sup>5</sup></code></li>
50+
<li><code>meetings[i].length == 2</code></li>
51+
<li><code><font face="monospace">1 &lt;= meetings[i][0] &lt;= meetings[i][1] &lt;= days</font></code></li>
52+
</ul>

0 commit comments

Comments
 (0)