From 6e876d3b9cefcdbb6d5d6bb1db9f84f813748504 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 2 Apr 2018 01:51:49 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=B0=EC=A1=B4=20Queue=EB=A5=BC=20SplQueue?= =?UTF-8?q?=EB=A1=9C=20=EB=8C=80=EC=B2=B4=ED=95=98=EC=98=80=EC=9C=BC?= =?UTF-8?q?=EB=AF=80=EB=A1=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/queue.php | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 hwe/queue.php diff --git a/hwe/queue.php b/hwe/queue.php deleted file mode 100644 index 210bc0f8..00000000 --- a/hwe/queue.php +++ /dev/null @@ -1,43 +0,0 @@ -capacity = $capacity; - $this->size = 0; - $this->head = 0; - $this->tail = 0; - } - - function getSize() { - return $this->size; - } - - function clear() { - $this->size = 0; - $this->head = 0; - $this->tail = 0; - } - - function push($value) { - if($this->size >= $this->capacity) return; - $this->arr[$this->tail] = $value; - $this->tail = ($this->tail + 1) % $this->capacity; - $this->size++; - } - - function pop() { - if($this->size <= 0) return null; - $value = $this->arr[$this->head]; - $this->head = ($this->head + 1) % $this->capacity; - $this->size--; - return $value; - } -}