summaryrefslogtreecommitdiff
path: root/queue.py
diff options
context:
space:
mode:
authorZhongheng Liu <z.liu@outlook.com.gr>2024-11-25 20:38:03 +0200
committerZhongheng Liu <z.liu@outlook.com.gr>2024-11-25 20:38:03 +0200
commit4531afb7137e85dbdc45ec9147612a101568a507 (patch)
tree473fcf5b2e0ab7b1852ca7749b91231d797e2e73 /queue.py
parent5df83b0e15a757b4803b66b9af6a7e5afcd1667e (diff)
downloadcs-y13-4531afb7137e85dbdc45ec9147612a101568a507.tar.gz
cs-y13-4531afb7137e85dbdc45ec9147612a101568a507.tar.bz2
cs-y13-4531afb7137e85dbdc45ec9147612a101568a507.zip
chore: move and rename
Diffstat (limited to 'queue.py')
-rw-r--r--queue.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/queue.py b/queue.py
deleted file mode 100644
index 4235a7f..0000000
--- a/queue.py
+++ /dev/null
@@ -1,23 +0,0 @@
-queue = [None for index in range(0, 10)]
-frontPointer = 0
-rearPointer = -1
-queueLength = 0
-queueFull = 10
-def dequeue():
- global queue, queueLength, queueFull, rearPointer
-
-def enqueue(item):
- global queue, queueLength, queueFull, rearPointer
- if queueLength < queueFull:
- if rearPointer < len(queue) - 1:
- rearPointer += 1
- else:
- rearPointer = 0
- queueLength += 1
- queue[rearPointer] = item
- print(queue)
- return
- print("ERROR queue length exceeded!")
- return
-for i in range(13):
- enqueue(10 * i)