Assignment 2 focuses on implementation of the Map ADT using a binary tree implementation. Different from the class however, you will be implementing a map extremely similar to the c++ stl map. As such, remember to look here if you are confused on how certain operations are performed before posting a question to piazza.
Essentially, this assignment mainly focuses on implementation, but you must turn in a report as well. The report focuses on analyzing Big-Oh and performance of MySTL::map.
If you have questions, or if something is unclear, please post on piazza.
In this assignment, you need to implement all items which can be found under todos, which is essentially all variants of find operations, insert operations, erase operations, and finishing the implementation for the node classes constructor and destructor. You should also think about a good order to implement them in. I recommend:
After completing, feel free to remove each doxygen todo statement from the code, this way you can keep track!
Unit testing is provided to aid you in determining if your implementation is correct, however, note the tests are not exhaustive! If all tests are reported to pass, this is only part of the process. If you are not convinced your code is correct, please add more tests.
Your report will include the objective of the assignment, a brief description of your implementation and experiments, and discussion of your results. At a minimum, your report should include the following sections:
Results & Discussion. In this section, you will experiment to perform n insert operations on an initially empty map. You will compare orderings of data including linear tree structure, complete tree structure, and randomized data. timing.cpp is already setup to generate all data you will need in your base experiments. Include and discuss the following plots:
For plot discussions think of this: what is presented in each plot (i.e., explain the data), what conclusion to do see from the data (i.e., learn from the data), and connect the data back to your theoretical discussion.
Implement a self balancing mechanism for your Map ADT, e.g., AVL trees. Augment your experiments and theoretical analysis to show how AVL performs equally on the data sets in the regular assignment.