AVLTree
November 14, 2020 ยท View on GitHub
Implements: IBinarySearchTree<T>
Represents a node-based, self-balancing IBinarySearchTree
Constructors
AVLTree() Initializes a new instance of AVLTree
AVLTree(IEnumerable<T> collection) Initializes a new instance of AVLTree
AVLTree(IComparer<T> comparer) Initializes a new instance of AVLTree
Properties
int Count Gets the number of elements stored in the AVLTree
T Min Gets the minimum value element stored in the AVLTree
T Max Gets the maximum value element stored in the AVLTree
T this[int index] Gets the element at the specified index. Complexity: O(LogN)
Methods
int Insert(T value) Inserts an element into the AVLTree
bool Find(T value) Determines whether the AVLTree
bool Remove(T value) Removes one occurrence of a specific element from the AVLTree
T[] InOrderTraverse() Returns the list of the elements stored in the AVLTree
T[] PreOrderTraverse() Returns the list of the elements stored in the AVLTree
T[] PostOrderTraverse() Returns the list of the elements stored in the AVLTree