Incremunica
    Preparing search index...

    A doubly linked list implementation.

    Type Parameters

    • T
    Index

    Constructors

    Accessors

    • get length(): number

      Returns the length of the list.

      Returns number

      The length of the list.

    Methods

    • Adds a value at a specific index.

      Parameters

      • index: number

        The index to add the value at.

      • value: T

        The value to add.

      Returns boolean

      True if the value was added successfully.

    • Deletes a value at a specific index.

      Parameters

      • index: number

        The index to delete the value at.

      Returns undefined | T

      The deleted value or undefined if the index is out of bounds.

    • Returns the node at a specific index.

      Parameters

      • index: number

        The index to get the node at.

      Returns undefined | DoubleNode<T>

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

    • Removes a value from the end of the list.

      Returns undefined | T

      The removed value or undefined if the list is empty.

    • Adds a value to the end of the list.

      Parameters

      • value: T

        The value to push.

      Returns boolean

      True if the value was added successfully.

    • Removes a value from the start of the list.

      Returns undefined | T

      The removed value or undefined if the list is empty.

    • Adds a value to the start of the list.

      Parameters

      • value: T

        The value to unshift.

      Returns boolean

      True if the value was added successfully.