4.2. AVL Trees
This section discusses a type of balanced binary search trees called AVL Trees.
AVL Node
public class AVLNode<T extends Comparable<T>> extends AbstractBinaryNode<T, AVLNode<T>> {
private int height;
public AVLNode(T key) {
super(key);
height = 1;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
}
AVL Tree
Last updated
Was this helpful?