Queue data structure implemented with a linked list for efficient O(1) enqueue and dequeue operations. Supports standard queue operations such as enqueue, dequeue, and peek.
The type of elements held in the queue.
Gets the number of elements in the queue.
The size of the queue.
Clears all elements from the queue, resetting it to an empty state.
Removes and returns the element at the front of the queue.
The value of the dequeued element, or undefined if the queue is empty.
Adds an element to the end of the queue.
The value to add.
Checks if the queue is empty.
True if the queue is empty, otherwise false.
Returns the element at the front of the queue without removing it.
The value at the front, or undefined if the queue is empty.
Queue data structure implemented with a linked list for efficient O(1) enqueue and dequeue operations. Supports standard queue operations such as enqueue, dequeue, and peek.