Abstract Linked Lists - v1.0.4
    Preparing search index...

    Class AbstractLinkedList<N>Abstract

    Core abstract base class for all linked list implementations.

    Defines the fundamental contract that all linked lists must fulfill, providing a unified interface for basic list operations.

    class MyLinkedList extends AbstractLinkedList {
    // Implement abstract methods
    }

    Type Parameters

    • N

      The type of the nodes in the list.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Returns an iterator for traversing the list. Supports both forward and reverse traversal.

      Parameters

      • reversed: boolean

        If true, the iterator will traverse the list in reverse order.

      Returns Generator<N, void, void>

      An iterator yielding nodes in the specified orders.

    • Retrieves the node at the specified index.

      Parameters

      • index: number

        The zero-based index of the node to retrieve.

      Returns undefined | N

      The node at the specified index, or undefined if the index is out of bounds.