Interface IBinarySearchTree<T>
- Namespace
- AlgorithmsSW.SearchTrees
- Assembly
- AlgorithmsSW.dll
public interface IBinarySearchTree<T>
Type Parameters
T
- Extension Methods
-
Properties
Count
Property Value
- int
IsEmpty
Property Value
- bool
NodesInOrder
IEnumerable<INode<T>> NodesInOrder { get; }
Property Value
- IEnumerable<INode<T>>
NodesLevelOrder
IEnumerable<INode<T>> NodesLevelOrder { get; }
Property Value
- IEnumerable<INode<T>>
NodesPostOrder
IEnumerable<INode<T>> NodesPostOrder { get; }
Property Value
- IEnumerable<INode<T>>
NodesPreOrder
IEnumerable<INode<T>> NodesPreOrder { get; }
Property Value
- IEnumerable<INode<T>>
Root
Property Value
- INode<T>
Methods
Add(T)
Parameters
item
T
CountNodesSmallerThan(T)
int CountNodesSmallerThan(T item)
Parameters
item
T
Returns
- int
GetMaxNode()
Returns
- INode<T>
GetMinNode()
Returns
- INode<T>
Height()
Returns
- int
LargestKeyLessThanOrEqualTo(T)
INode<T>? LargestKeyLessThanOrEqualTo(T key)
Parameters
key
T
Returns
- INode<T>
Range(T, T)
IEnumerable<INode<T>> Range(T start, T end)
Parameters
start
T
end
T
Returns
- IEnumerable<INode<T>>
Remove(T)
Parameters
item
T
RemoveMaxNode()
Returns
- INode<T>
RemoveMinNode()
Returns
- INode<T>
SmallestKeyGreaterThanOrEqualTo(T)
INode<T>? SmallestKeyGreaterThanOrEqualTo(T key)
Parameters
key
T
Returns
- INode<T>
TryFindNode(T, out INode<T>)
bool TryFindNode(T item, out INode<T> node)
Parameters
item
T
node
INode<T>
Returns
- bool