• Generates an iterator that traverses a singly linked list in order.

    • Time Complexity (complete traversal): O(n)
    • Space Complexity: O(1) - only stores current node reference.

    Type Parameters

    Parameters

    • head: null | N

      The head node of the list, or null if the list is empty.

    Returns Generator<N, void, unknown>

    An iterator yielding nodes in forward order.