I am working on making an AVL tree in Java I need help fini.pdf
1. I am working on making an AVL tree in Java, I need help finishing my roatation methods,
rightRotate() is not working so I have not yet attempted rotateLeft();
public class MyAVLNode {
private MyAVLNode left, right, parent;
private int element, height;
public MyAVLNode getRight() {
return right;
}
public void setRight(MyAVLNode right) {
this.right = right;
}
public MyAVLNode getLeft() {
return left;
}
public void setLeft(MyAVLNode left) {
this.left = left;
}
public MyAVLNode getParent() {
return parent;
}
public void setParent(MyAVLNode parent) {
this.parent = parent;
}
public int getElement() {
return element;
}
public void setElement(int element) {
this.element = element;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
}
public class MyAVLTree {
private MyAVLNode root;