Skip to content

Commit 1dd6a31

Browse files
authored
GH-277: Queue in general (#278)
1 parent 51caba4 commit 1dd6a31

File tree

9 files changed

+34
-11
lines changed

9 files changed

+34
-11
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ A data structure is a data organization, management, and storage format that is
8080
<a href="/concepts/general/stack/README.md">Stack</a>
8181
</li>
8282
<li>
83-
<code>B</code> Queue
84-
<a href="/concepts/cpp/queue.md"><code>cpp🐀</code></a>
85-
<a href="/concepts/python/queue.md"><code>py🐍</code></a>
86-
<a href="/concepts/typescript/queue.md"><code>ts</code></a>
83+
<code>B</code>
84+
<a href="/concepts/general/queue/README.md">Queue</a>
8785
</li>
8886
<li>
8987
<code>B</code> Set

concepts/cpp/queue.md renamed to concepts/cpp/queue/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Output
5050
## 🔗 Further Reading
5151

5252
* [std::queue](https://en.cppreference.com/w/cpp/container/queue), cppreference.com
53-
* [Queue (abstract data type)](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)), wikiepdia
53+
* [Queue (abstract data type)](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)), wikipedia
5454
* ▶️ [Queue Introduction](https://www.youtube.com/watch?v=KxzhEQ-zpDc&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=11&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
5555
* ▶️ [Queue Implementation](https://www.youtube.com/watch?v=EoisnPvUkOA&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=12&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
5656
* ▶️ [Queue Code](https://www.youtube.com/watch?v=HV-hpvuGaC4&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=13&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017

concepts/general/queue/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Queue
2+
3+
*See implementation in*
4+
[C++](/concepts/cpp/queue/README.md),
5+
Java,
6+
[Python](/concepts/python/queue/README.md),
7+
[Typescript](/concepts/typescript/queue/README.md)
8+
9+
In computer science, a queue is an abstract data type that serves as a collection of elements, with two main operations: `Enqueue`, which adds an element to the collection, and `Dequeue`, which removes the least recently added element that was not yet removed.
10+
11+
## Stack Operations
12+
13+
Here are some basic operations that you can perform on stacks:
14+
15+
* `Enqueue`: Add an element to the end of the queue.
16+
* `Dequeue`: Remove the first element of the queue.
17+
* `Peek`: Get the value of the first element of the queue without removing it.
18+
* `IsEmpty`: Check if the queue is empty.
19+
* `Size`: Get the number of elements in the queue.
20+
21+
## 🔗 Further Reading
22+
23+
* [Queue (abstract data type)](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)), wikipedia
24+
* ▶️ [Queue Introduction](https://www.youtube.com/watch?v=KxzhEQ-zpDc&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=11&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
25+
* ▶️ [Queue Implementation](https://www.youtube.com/watch?v=EoisnPvUkOA&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=12&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
26+
* ▶️ [Queue Code](https://www.youtube.com/watch?v=HV-hpvuGaC4&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=13&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017

concepts/general/stack/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ Here are some basic operations that you can perform on stacks:
2222

2323
* ▶️ [Stack Introduction](https://youtu.be/L3ud3rXpIxA?list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu), Data structures playlist, WilliamFiset, 2017
2424
* ▶️ [Stack Implementation](https://www.youtube.com/watch?v=RAMqDLI6_1c&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=9&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
25-
* ▶️ [Stack Code](https://www.youtube.com/watch?v=oiZssCfk4_U&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=10&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
26-
es the most recently added element that was not yet removed.
25+
* ▶️ [Stack Code](https://www.youtube.com/watch?v=oiZssCfk4_U&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=10&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
File renamed without changes.
File renamed without changes.

readme/cpp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ A data structure is a data organization, management, and storage format that is
3131
</li>
3232
<li>
3333
<code>B</code>
34-
<a href="/concepts/cpp/stack/README.md">Stack</
34+
<a href="/concepts/cpp/stack/README.md">Stack</a>
3535
</li>
3636
<li>
3737
<code>B</code>
38-
<a href="/concepts/cpp/queue.md">Queue</a>
38+
<a href="/concepts/cpp/queue/README.md">Queue</a>
3939
</li>
4040
<li>
4141
<code>B</code>

readme/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A data structure is a data organization, management, and storage format that is
3636
</li>
3737
<li>
3838
<code>B</code>
39-
<a href="/concepts/python/queue.md">Queue</a>
39+
<a href="/concepts/python/queue/README.md">Queue</a>
4040
</li>
4141
<li>
4242
<code>B</code>

readme/typescript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A data structure is a data organization, management, and storage format that is
3636
</li>
3737
<li>
3838
<code>B</code>
39-
<a href="/concepts/typescript/queue.md">Queue</a>
39+
<a href="/concepts/typescript/queue/README.md">Queue</a>
4040
</li>
4141
<li>
4242
<code>B</code>

0 commit comments

Comments
 (0)