Interface ISinglyLinkedList<N>

Interface representing a singly linked list data structure. Implements the base linked list interface with singly linked nodes.

interface ISinglyLinkedList<
    N extends ISinglyLinkedListNode = ISinglyLinkedListNode,
> {
    head: null | N;
    size: number;
    tail: null | N;
}

Type Parameters

Hierarchy (View Summary)

Implemented by

Properties

Properties

head: null | N

Reference to the first node in the list. Set to null when the list is empty.

size: number

The current number of nodes in the list.

tail: null | N

Reference to the last node in the list. Set to null when the list is empty.