i am working on an avl tree and i think ive got the everything right, but im not sure here is my rotate right function am i doing it correcty?
Node* BinaryTree::rotateRight(Node *N)
{
Node *newNode = new Node();
newNode = N->getLeft();
N->setLeft(newNode->getRight());
newNode->setRight(N);
root = newNode;
return newNode;
}