Skip to content

GH-277: Queue in general #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ A data structure is a data organization, management, and storage format that is
<a href="/concepts/general/stack/README.md">Stack</a>
</li>
<li>
<code>B</code> Queue
<a href="/concepts/cpp/queue.md"><code>cpp🐀</code></a>
<a href="/concepts/python/queue.md"><code>py🐍</code></a>
<a href="/concepts/typescript/queue.md"><code>ts</code></a>
<code>B</code>
<a href="/concepts/general/queue/README.md">Queue</a>
</li>
<li>
<code>B</code> Set
Expand Down
2 changes: 1 addition & 1 deletion concepts/cpp/queue.md → concepts/cpp/queue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Output
## 🔗 Further Reading

* [std::queue](https://en.cppreference.com/w/cpp/container/queue), cppreference.com
* [Queue (abstract data type)](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)), wikiepdia
* [Queue (abstract data type)](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)), wikipedia
* ▶️ [Queue Introduction](https://www.youtube.com/watch?v=KxzhEQ-zpDc&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=11&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
* ▶️ [Queue Implementation](https://www.youtube.com/watch?v=EoisnPvUkOA&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=12&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
* ▶️ [Queue Code](https://www.youtube.com/watch?v=HV-hpvuGaC4&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=13&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
Expand Down
26 changes: 26 additions & 0 deletions concepts/general/queue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Queue

*See implementation in*
[C++](/concepts/cpp/queue/README.md),
Java,
[Python](/concepts/python/queue/README.md),
[Typescript](/concepts/typescript/queue/README.md)

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.

## Stack Operations

Here are some basic operations that you can perform on stacks:

* `Enqueue`: Add an element to the end of the queue.
* `Dequeue`: Remove the first element of the queue.
* `Peek`: Get the value of the first element of the queue without removing it.
* `IsEmpty`: Check if the queue is empty.
* `Size`: Get the number of elements in the queue.

## 🔗 Further Reading

* [Queue (abstract data type)](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)), wikipedia
* ▶️ [Queue Introduction](https://www.youtube.com/watch?v=KxzhEQ-zpDc&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=11&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
* ▶️ [Queue Implementation](https://www.youtube.com/watch?v=EoisnPvUkOA&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=12&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
* ▶️ [Queue Code](https://www.youtube.com/watch?v=HV-hpvuGaC4&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=13&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
3 changes: 1 addition & 2 deletions concepts/general/stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ Here are some basic operations that you can perform on stacks:

* ▶️ [Stack Introduction](https://youtu.be/L3ud3rXpIxA?list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu), Data structures playlist, WilliamFiset, 2017
* ▶️ [Stack Implementation](https://www.youtube.com/watch?v=RAMqDLI6_1c&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=9&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
* ▶️ [Stack Code](https://www.youtube.com/watch?v=oiZssCfk4_U&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=10&ab_channel=WilliamFiset), Data structures playlist, WilliamFiset, 2017
es the most recently added element that was not yet removed.
* ▶️ [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.
4 changes: 2 additions & 2 deletions readme/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ A data structure is a data organization, management, and storage format that is
</li>
<li>
<code>B</code>
<a href="/concepts/cpp/stack/README.md">Stack</
<a href="/concepts/cpp/stack/README.md">Stack</a>
</li>
<li>
<code>B</code>
<a href="/concepts/cpp/queue.md">Queue</a>
<a href="/concepts/cpp/queue/README.md">Queue</a>
</li>
<li>
<code>B</code>
Expand Down
2 changes: 1 addition & 1 deletion readme/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ A data structure is a data organization, management, and storage format that is
</li>
<li>
<code>B</code>
<a href="/concepts/python/queue.md">Queue</a>
<a href="/concepts/python/queue/README.md">Queue</a>
</li>
<li>
<code>B</code>
Expand Down
2 changes: 1 addition & 1 deletion readme/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ A data structure is a data organization, management, and storage format that is
</li>
<li>
<code>B</code>
<a href="/concepts/typescript/queue.md">Queue</a>
<a href="/concepts/typescript/queue/README.md">Queue</a>
</li>
<li>
<code>B</code>
Expand Down