you will implement a simplified version of the


You will implement a simplified version of the set class. You must implement all functions defined in the provided file set.h. You may add other member functions and variables as necessary.

Do NOT change the name of m_root and do NOT make it private. My testing program needs direct access. Also, you may wish to adapt the bst_node class. But, do not change the signatures or pre/post conditions of any of the existing bst_node functions, as my testing program will also use these.
You must also submit a driver program that thoroughly tests all set operations. Part of your grade will depend on the quality of your test cases. Make sure to test edge cases, small, and large inputs.

Implement automatic rebalancing. Use a threshold where if the difference in depth between any two leaf nodes becomes greater than 10, we rebalance the tree. You should not need to iterate through the entire tree on every insertion or removal to determine this. You will need to use an auxililiary data structure and/or alter the bst_node class to achieve this.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: you will implement a simplified version of the
Reference No:- TGS0446689

Now Priced at $25 (50% Discount)

Recommended (97%)

Rated (4.9/5)