Class DoublyLinkedList<T> | Advanced Algorithms
Search Results for

    Show / Hide Table of Contents

    Class DoublyLinkedList<T>

    A doubly linked list implementation.

    Inheritance
    Object
    DoublyLinkedList<T>
    Implements
    IEnumerable<T>
    IEnumerable
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Advanced.Algorithms.DataStructures
    Assembly: Advanced.Algorithms.dll
    Syntax
    public class DoublyLinkedList<T> : IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    Fields

    | Improve this Doc View Source

    Head

    Declaration
    public DoublyLinkedListNode<T> Head
    Field Value
    Type Description
    DoublyLinkedListNode<T>
    | Improve this Doc View Source

    Tail

    Declaration
    public DoublyLinkedListNode<T> Tail
    Field Value
    Type Description
    DoublyLinkedListNode<T>

    Methods

    | Improve this Doc View Source

    Clear()

    Time complexity: O(1).

    Declaration
    public void Clear()
    | Improve this Doc View Source

    Delete(T)

    Time complexity: O(n).

    Declaration
    public void Delete(T data)
    Parameters
    Type Name Description
    T data
    | Improve this Doc View Source

    Delete(DoublyLinkedListNode<T>)

    Delete the given node. Time complexity: O(n).

    Declaration
    public void Delete(DoublyLinkedListNode<T> node)
    Parameters
    Type Name Description
    DoublyLinkedListNode<T> node
    | Improve this Doc View Source

    DeleteFirst()

    Time complexity: O(1).

    Declaration
    public T DeleteFirst()
    Returns
    Type Description
    T
    | Improve this Doc View Source

    DeleteLast()

    Delete tail node. Time complexity: O(1)

    Declaration
    public T DeleteLast()
    Returns
    Type Description
    T
    | Improve this Doc View Source

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    IEnumerator<T>
    | Improve this Doc View Source

    InsertAfter(DoublyLinkedListNode<T>, DoublyLinkedListNode<T>)

    Insert right after this node. Time complexity: O(1).

    Declaration
    public DoublyLinkedListNode<T> InsertAfter(DoublyLinkedListNode<T> node, DoublyLinkedListNode<T> data)
    Parameters
    Type Name Description
    DoublyLinkedListNode<T> node
    DoublyLinkedListNode<T> data
    Returns
    Type Description
    DoublyLinkedListNode<T>
    | Improve this Doc View Source

    InsertBefore(DoublyLinkedListNode<T>, DoublyLinkedListNode<T>)

    Insert right before this node. Time complexity:O(1).

    Declaration
    public DoublyLinkedListNode<T> InsertBefore(DoublyLinkedListNode<T> node, DoublyLinkedListNode<T> data)
    Parameters
    Type Name Description
    DoublyLinkedListNode<T> node
    DoublyLinkedListNode<T> data
    Returns
    Type Description
    DoublyLinkedListNode<T>
    | Improve this Doc View Source

    InsertFirst(T)

    Time complexity: O(1).

    Declaration
    public DoublyLinkedListNode<T> InsertFirst(T data)
    Parameters
    Type Name Description
    T data
    Returns
    Type Description
    DoublyLinkedListNode<T>

    The new node.

    | Improve this Doc View Source

    InsertLast(T)

    Time complexity:O(1).

    Declaration
    public DoublyLinkedListNode<T> InsertLast(T data)
    Parameters
    Type Name Description
    T data
    Returns
    Type Description
    DoublyLinkedListNode<T>
    | Improve this Doc View Source

    IsEmpty()

    Time complexity: O(1).

    Declaration
    public bool IsEmpty()
    Returns
    Type Description
    Boolean

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    IEnumerator

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX