class documentation

class LinkedQueue:

View In Hierarchy

FIFO queue implementation using a singly linked list for storage.

Method __init__ Create an empty queue.
Method __len__ Return the number of elements in the queue.
Method dequeue Remove and return the first element of the queue (i.e., FIFO).
Method enqueue Add an element to the back of queue.
Method first Return (but do not remove) the element at the front of the queue.
Method is_empty Return True if the queue is empty.
Class _Node Lightweight, nonpublic class for storing a singly linked node.
Instance Variable _head Undocumented
Instance Variable _size Undocumented
Instance Variable _tail Undocumented
def __init__(self):

Create an empty queue.

def __len__(self):

Return the number of elements in the queue.

def dequeue(self):

Remove and return the first element of the queue (i.e., FIFO).

Raise Empty exception if the queue is empty.

def enqueue(self, e):

Add an element to the back of queue.

def first(self):

Return (but do not remove) the element at the front of the queue.

Raise Empty exception if the queue is empty.

def is_empty(self):

Return True if the queue is empty.

_head =

Undocumented

_size: int =

Undocumented

_tail =

Undocumented