Module pythonnds.queue
In computer science, a queue is a collection of entities that are maintained in a sequence and can be modified by the addition of entities at one end of the sequence and the removal of entities from the other end of the sequence.
Classes
-
class Node (value: ~T) -
class Queue -
Methods
-
def dequeue(self) ‑> ~T -
Remove element from the queue.
-
def enqueue(self, value: ~T) ‑> NoneType -
Add element to queue.
-
def getHead(self) ‑> ~T -
View first element in the queue.
-
def getSize(self) ‑> int -
Get size of the queue.
-
def getTail(self) -
View last element in the queue.
-
def isEmpty(self) ‑> bool -
Check if queue is empty.
-