notes update heightsthen set new root *void rotatewithrightchildavlnode avlnode * ->rightk ->right ->leftk ->left ->height maxheightk ->left )heightk ->right ->height maxheightk ->right ) ->height /*double rotate binary tree nodefirst left child with its right childthen node with new left child for avl treesthis is double rotation for case update heightsthen set new root *void doublewithleftchildavlnode rotatewithrightchildk ->left )rotatewithleftchildk )/*double rotate binary tree nodefirst right child with its left childthen node with new right child for avl treesthis is double rotation for case update heightsthen set new root *void doublewithrightchildavlnode rotatewithleftchildk ->right )rotatewithrightchildk )}#endif lovely professional university