From 132a5700c4045b5287213332542405b49ccd17ae Mon Sep 17 00:00:00 2001
From: bt3gl <138340846+cypher-bt3gl@users.noreply.github.com>
Date: Sat, 29 Jul 2023 20:30:08 -0700
Subject: [PATCH] Update README.md
---
stacks_and_queues/README.md | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/stacks_and_queues/README.md b/stacks_and_queues/README.md
index e6e7c07..7a48a58 100644
--- a/stacks_and_queues/README.md
+++ b/stacks_and_queues/README.md
@@ -2,6 +2,19 @@
+### queues
+
+
+
+* queues can be implemented with two arrays or a dynamic array (linked list).
+* if implemented with a dynamic array, a more efficient solution is to use a circular queue (ring buffer), i.e. a fixed-size array and two pointers to indicate the starting and ending positions.
+* an advantage of circular queues is that we can use the spaces in front of the queue. in a normal queue, once the queue becomes full, we cannot insert the next element even if there is a space in front of the queue. but using the circular queue, we can use the space to store new values.
+
+
+
+
+----
+
### `Queues.py`
@@ -56,4 +69,4 @@ Popping...
17
16
Stack: [12, 13, 14, 15]
-```
\ No newline at end of file
+```