Skip to content

Commit f01419c

Browse files
committed
update readme
1 parent b48e84d commit f01419c

File tree

5 files changed

+9
-104
lines changed

5 files changed

+9
-104
lines changed

1802-number-of-students-unable-to-eat-lunch/1802-number-of-students-unable-to-eat-lunch.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

1802-number-of-students-unable-to-eat-lunch/README.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

Python/1700-number-of-students-unable-to-eat-lunch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ def countStudents(self, students: List[int], sandwiches: List[int]) -> int:
2727
students = [1, 1, 1, 0, 0, 1]
2828
sandwiches = [1, 0, 0, 0, 1, 1]
2929
print(Solution().countStudents(students, sandwiches))
30+
students = [1, 1, 1, 0, 0, 1]
31+
sandwiches = [1, 0, 0, 0, 1, 1]
32+
print(Solution().countStudents(students, sandwiches))

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,3 @@ It helps others discover the repo and keeps the project growing.
115115
---
116116

117117
Feedback / Questions → open an Issue or reach out on [LinkedIn](https://www.linkedin.com/in/hogan-l/)
118-
119-
<!---LeetCode Topics Start-->
120-
# LeetCode Topics
121-
## Array
122-
| |
123-
| ------- |
124-
| [1802-number-of-students-unable-to-eat-lunch](https://github.com/hogan-tech/leetcode-solution/tree/master/1802-number-of-students-unable-to-eat-lunch) |
125-
## Stack
126-
| |
127-
| ------- |
128-
| [1802-number-of-students-unable-to-eat-lunch](https://github.com/hogan-tech/leetcode-solution/tree/master/1802-number-of-students-unable-to-eat-lunch) |
129-
## Queue
130-
| |
131-
| ------- |
132-
| [1802-number-of-students-unable-to-eat-lunch](https://github.com/hogan-tech/leetcode-solution/tree/master/1802-number-of-students-unable-to-eat-lunch) |
133-
## Simulation
134-
| |
135-
| ------- |
136-
| [1802-number-of-students-unable-to-eat-lunch](https://github.com/hogan-tech/leetcode-solution/tree/master/1802-number-of-students-unable-to-eat-lunch) |
137-
<!---LeetCode Topics End-->

Readme/1700-number-of-students-unable-to-eat-lunch.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<h2><a href="https://leetcode.com/problems/number-of-students-unable-to-eat-lunch/">1700. Number of Students Unable to Eat Lunch</a></h2><h3>Easy</h3><hr><div><p>The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers <code>0</code> and <code>1</code> respectively. All students stand in a queue. Each student either prefers square or circular sandwiches.</p>
1+
<h2><a href="https://leetcode.com/problems/number-of-students-unable-to-eat-lunch">1802. Number of Students Unable to Eat Lunch</a></h2><h3>Easy</h3><hr><p>The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers <code>0</code> and <code>1</code> respectively. All students stand in a queue. Each student either prefers square or circular sandwiches.</p>
22

33
<p>The number of sandwiches in the cafeteria is equal to the number of students. The sandwiches are placed in a <strong>stack</strong>. At each step:</p>
44

55
<ul>
66
<li>If the student at the front of the queue <strong>prefers</strong> the sandwich on the top of the stack, they will <strong>take it</strong> and leave the queue.</li>
7-
<li>Otherwise, they will <strong>leave it</strong> and go to the queue's end.</li>
7+
<li>Otherwise, they will <strong>leave it</strong> and go to the queue&#39;s end.</li>
88
</ul>
99

1010
<p>This continues until none of the queue students want to take the top sandwich and are thus unable to eat.</p>
@@ -14,7 +14,8 @@
1414
<p>&nbsp;</p>
1515
<p><strong class="example">Example 1:</strong></p>
1616

17-
<pre><strong>Input:</strong> students = [1,1,0,0], sandwiches = [0,1,0,1]
17+
<pre>
18+
<strong>Input:</strong> students = [1,1,0,0], sandwiches = [0,1,0,1]
1819
<strong>Output:</strong> 0<strong>
1920
Explanation:</strong>
2021
- Front student leaves the top sandwich and returns to the end of the line making students = [1,0,0,1].
@@ -30,7 +31,8 @@ Hence all students are able to eat.
3031

3132
<p><strong class="example">Example 2:</strong></p>
3233

33-
<pre><strong>Input:</strong> students = [1,1,1,0,0,1], sandwiches = [1,0,0,0,1,1]
34+
<pre>
35+
<strong>Input:</strong> students = [1,1,1,0,0,1], sandwiches = [1,0,0,0,1,1]
3436
<strong>Output:</strong> 3
3537
</pre>
3638

@@ -43,4 +45,3 @@ Hence all students are able to eat.
4345
<li><code>sandwiches[i]</code> is <code>0</code> or <code>1</code>.</li>
4446
<li><code>students[i]</code> is <code>0</code> or <code>1</code>.</li>
4547
</ul>
46-
</div>

0 commit comments

Comments
 (0)