Skip to main content

Queue

Create a Queue.

Usage

src/sample/queue.ts
import { Queue } from 'athro';

let queue = new Queue();

Available Methods

Methods available for Queue.

MethodsDescriptionSyntax
enqueueAdd item to the queuequeue.enqueue(value)
dequeueRemove item from the queuequeue.dequeue()
peekGet the value of item in the front of the queuequeue.peek()
isEmptyCheck if the queue is emptyqueue.isEmpty()
getSizeGet size of the queuequeue.getSize()