Question: CODE IN C++ PLEASE Create an AVL Tree as a C++ class called AVLTree. I have implemented a binary search tree (BST) in C++ using

CODE IN C++ PLEASE

Create an AVL Tree as a C++ class called AVLTree. I have implemented a binary search tree (BST) in C++ using C++11 smart pointers weak_ptr and shared_ptr, which are built to help you manage memory.

-Implement an Insert function that utilizes the rotations as described at GeeksForGeeks: https://www.geeksforgeeks.org/?p=17679

-Implement a Delete function as described at GeeksForGeeks: https://www.geeksforgeeks.org/avl-tree-set-2-deletion/ Note that the article links to BST deletion: https://www.geeksforgeeks.org/binary-search-tree-set-2-delete/ When a node is deleted in a BST, if it has two children, either the inorder successor or the inorder predecessor is copied. Either choice is fine for this programming assignment.

-Implement a DeleteMin function which deletes the minimum key in the AVL tree. Any implementation that runs in O(log n) time is acceptable.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!