Class BinaryTree<T>
A binary tree implementation using pointers.
Inheritance
BinaryTree<T>
Assembly: Advanced.Algorithms.dll
Syntax
public class BinaryTree<T> : IEnumerable<T>, IEnumerable where T : IComparable
Type Parameters
Properties
|
Improve this Doc
View Source
Count
Declaration
public int Count { get; }
Property Value
Methods
|
Improve this Doc
View Source
Children(T)
Declaration
public IEnumerable<T> Children(T value)
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
|
Improve this Doc
View Source
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 |
|
|
Improve this Doc
View Source
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
|
Improve this Doc
View Source
GetHeight()
Declaration
Returns
|
Improve this Doc
View Source
HasItem(T)
Declaration
public bool HasItem(T value)
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
|
Improve this Doc
View Source
Insert(T, T)
Declaration
public void Insert(T parent, T child)
Parameters
Type |
Name |
Description |
T |
parent |
|
T |
child |
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements