Class SkipList<T> | Advanced Algorithms
Search Results for

    Show / Hide Table of Contents

    Class SkipList<T>

    A skip list implementation with IEnumerable support.

    Inheritance
    Object
    SkipList<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 SkipList<T> : IEnumerable<T>, IEnumerable where T : IComparable
    Type Parameters
    Name Description
    T

    The data type of thi skip list.

    Constructors

    | Improve this Doc View Source

    SkipList(Int32)

    Declaration
    public SkipList(int maxHeight = 32)
    Parameters
    Type Name Description
    Int32 maxHeight

    The maximum height.

    Fields

    | Improve this Doc View Source

    MaxHeight

    The maximum height of this skip list with which it was initialized.

    Declaration
    public readonly int MaxHeight
    Field Value
    Type Description
    Int32

    Properties

    | Improve this Doc View Source

    Count

    The number of elements in this skip list.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    Methods

    | Improve this Doc View Source

    Delete(T)

    Deletes the given value from this skip list. Will throw exception if the value does'nt exist in this skip list. Time complexity: O(log(n))

    Declaration
    public void Delete(T value)
    Parameters
    Type Name Description
    T value

    The value to delete.

    | Improve this Doc View Source

    Find(T)

    Finds the given value in this skip list. If item is not found default value of T will be returned. Time complexity: O(log(n)).

    Declaration
    public T Find(T value)
    Parameters
    Type Name Description
    T value
    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

    Insert(T)

    Inserts the given value to this skip list. Will throw exception if the value already exists. Time complexity: O(log(n))

    Declaration
    public void Insert(T value)
    Parameters
    Type Name Description
    T value

    The value to insert.

    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