Lab 4

Warning

To compile you should use a CMakeLists.txt. It takes sometimes to get use to it, but it makes the compilation much easier.

Splay Tree

  1. Download the header file of the class on Moodle.

  2. Implement each method of the class in a file SplayTree.cpp.

  3. Download the test file of the class main.

  4. Test your class. Make sure everything works.

Red-Black Tree

  1. Download the header file of the class RedBlackTree header

  2. Implement each method of the class in a file SplayTree.cpp.

  3. Download the test file of the class main.

  4. Test your class. Make sure everything works.

LeetCode

If you are done, you can start doing the following problems on LeetCode:

Finish the previous problem, if you’re done.