c++ algorithm : Write AVL Tree left rotation function: Leftrotate a node which has shared pointer of parent and sharedpointers of left and right children.
the AVL node has
private:
int key;
int height;
int balance_factor;
std::weak_ptr<AVLNode> parent;
std::shared_ptr<AVLNode> left;
std::shared_ptr<AVLNode> right;
Write the function of rotate:
void AVLTree::RotateLeft(std::shared_ptr <AVLNode>¤tNode) {
Expert Answer
An answer will be send to you shortly. . . . .