tstruct
Version:
Data structures & basic algorithms library
11 lines (10 loc) • 430 B
TypeScript
import { BinarySearchTree } from "./BinarySearchTree";
import { IBinaryTreeNode } from "./BinaryTree";
export declare class AVLTree<T> extends BinarySearchTree<T> {
add(value: T): void;
private balanceNode;
leftRotate(node: IBinaryTreeNode<T>): void;
leftRightRotate(node: IBinaryTreeNode<T>): void;
rightRotate(node: IBinaryTreeNode<T>): void;
rightLeftRotate(node: IBinaryTreeNode<T>): void;
}