Show / Hide Table of Contents

    Class BinaryTree<T>

    A binary tree implementation using pointers.

    Inheritance
    Object
    BinaryTree<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 BinaryTree<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

    Children(T)

    Time complexity: O(n)

    Declaration
    public IEnumerable<T> Children(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    IEnumerable<T>

    Delete(T)

    Only deletes unambiguous nodes (a node with two children cannot be deleted unambiguously). Time complexity: O(n)

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

    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, T)

    Declaration
    public void Insert(T parent, T child)
    Parameters
    Type Name Description
    T parent
    T child

    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