Show / Hide Table of Contents

    Class SplayTree<T>

    A splay tree implementation.

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

    Properties

    Count

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

    Methods

    Delete(T)

    Time complexity: O(n)

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

    FindMax()

    Time complexity: O(n)

    Declaration
    public T FindMax()
    Returns
    Type Description
    T

    FindMin()

    Time complexity: O(n)

    Declaration
    public T FindMin()
    Returns
    Type Description
    T

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    IEnumerator<T>

    GetHeight()

    Time complexity: O(n)

    Declaration
    public int GetHeight()
    Returns
    Type Description
    Int32

    HasItem(T)

    Time complexity: O(n)

    Declaration
    public bool HasItem(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    Boolean

    Insert(T)

    Time complexity: O(n)

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

    NextHigher(T)

    Get the next higher value to given value in this BST. Time complexity: O(n).

    Declaration
    public T NextHigher(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    T

    NextLower(T)

    Get the next lower value to given value in this BST. Time complexity: O(n).

    Declaration
    public T NextLower(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    T

    Explicit Interface Implementations

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    IEnumerator

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Back to top Generated by DocFX