Creates a new AVL Tree with the specified comparator function.
Function to compare two values. Should return: - negative number if a < b - zero if a === b - positive number if a > b
Private Readonly comparatorPrivate nodePrivate rootPrivate balancePrivate deletePrivate findPrivate getPrivate getPrivate inorderPrivate insertPrivate postorderPrivate preorderPrivate rotatePrivate rotatePrivate searchPrivate updateGenerated using TypeDoc
AVLTree is a self-balancing binary search tree where the heights of the two child subtrees of any node differ by at most one. It maintains O(log n) time complexity for insert, delete, and search operations through automatic rebalancing.
Example