Handin Due Monday In class, we've written a skeleton for AVL inserts. You'll need to finish writing the rotates and plugging them into the proper place in the insert function. At the end, you should have a function that can insert nodes into an AVL Tree. An auto-balancing tree. A useful print to help see some of the structure of a tree is: void BFTprint(AVLNode *root) { if (root == NULL){ return; } AVLNode *c = root; queue q; queue depths; q.push(root); depths.push(0); int lastdepth = 0; while(! q.empty()){ c = q.front(); q.pop(); int cd = depths.front(); depths.pop(); if(cd != lastdepth) { lastdepth = cd; cout << endl; } cout << c->value << " "; if (c->left != NULL){ q.push(c->left); depths.push(lastdepth+1); } if (c->right != NULL){ q.push(c->right); depths.push(lastdepth+1); } } } You should be able to get your code to operate using this as your main: int main() { AVLNode* root = NULL; int value_to_insert = 0; int total_nodes = 0; cout << "Input a value to insert into the tree or negative to quit: "; cin >> value_to_insert; while(value_to_insert > 0) { total_nodes++; root = insert(root, value_to_insert); BFTprint(root); cout << endl << "Total nodes is: " << total_nodes; cout << " and height of the tree is: "; cout << getHeight(root) << endl << endl;; cout << "Input a value to insert into the tree or negative to quit: "; cin >> value_to_insert; } }